codex - 💡(How to fix) Fix Remote CLI auto-compact times out on gpt-5.5 long sessions

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

2026-05-25T15:17:58.193082Z ERROR codex_core::compact_remote: remote compaction failed turn_id=<redacted> last_api_response_total_tokens=211465 all_history_items_model_visible_bytes=699124 estimated_tokens_of_items_added_since_last_successful_api_response=0 estimated_bytes_of_items_added_since_last_successful_api_response=0 model_context_window_tokens=Some(258400) failing_compaction_request_model_visible_bytes=713888 compact_error=request timed out Restarting the stale app-server fixed that startup/protocol error, but the automatic remote compaction timeout still appears to be a separate long-session reliability issue. fail quickly with a recoverable error and preserve enough state for the user to continue, or

Root Cause

The relevant remote log line is:

2026-05-25T15:17:58.193082Z ERROR codex_core::compact_remote: remote compaction failed turn_id=<redacted> last_api_response_total_tokens=211465 all_history_items_model_visible_bytes=699124 estimated_tokens_of_items_added_since_last_successful_api_response=0 estimated_bytes_of_items_added_since_last_successful_api_response=0 model_context_window_tokens=Some(258400) failing_compaction_request_model_visible_bytes=713888 compact_error=request timed out

Related observation: after upgrading the remote CLI from 0.130.0 to 0.133.0, an old codex app-server process had to be restarted because the TUI initially connected to the stale app server and failed with:

Invalid request: invalid type: string ":workspace", expected internally tagged enum PermissionProfileSelectionParams

Restarting the stale app-server fixed that startup/protocol error, but the automatic remote compaction timeout still appears to be a separate long-session reliability issue.

Fix Action

Fix / Workaround

Current workaround:

Code Example



---

2026-05-25T15:17:58.193082Z ERROR codex_core::compact_remote: remote compaction failed turn_id=<redacted> last_api_response_total_tokens=211465 all_history_items_model_visible_bytes=699124 estimated_tokens_of_items_added_since_last_successful_api_response=0 estimated_bytes_of_items_added_since_last_successful_api_response=0 model_context_window_tokens=Some(258400) failing_compaction_request_model_visible_bytes=713888 compact_error=request timed out

---

Invalid request: invalid type: string ":workspace", expected internally tagged enum PermissionProfileSelectionParams

---

cd ~/Simulation/OpenFOAM-dev
codex
Use gpt-5.5.

---

Unavailable / redacted.
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.133.0

What subscription do you have?

Not specified in this report.

Which model were you using?

gpt-5.5

What platform is your computer?

Linux 5.15.0-134-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

Windows, connecting to the remote Linux host over SSH.

Codex doctor report

What issue are you seeing?

In long-running remote CLI sessions, automatic context compaction can time out and the session becomes difficult to continue.

The relevant remote log line is:

2026-05-25T15:17:58.193082Z ERROR codex_core::compact_remote: remote compaction failed turn_id=<redacted> last_api_response_total_tokens=211465 all_history_items_model_visible_bytes=699124 estimated_tokens_of_items_added_since_last_successful_api_response=0 estimated_bytes_of_items_added_since_last_successful_api_response=0 model_context_window_tokens=Some(258400) failing_compaction_request_model_visible_bytes=713888 compact_error=request timed out

Related observation: after upgrading the remote CLI from 0.130.0 to 0.133.0, an old codex app-server process had to be restarted because the TUI initially connected to the stale app server and failed with:

Invalid request: invalid type: string ":workspace", expected internally tagged enum PermissionProfileSelectionParams

Restarting the stale app-server fixed that startup/protocol error, but the automatic remote compaction timeout still appears to be a separate long-session reliability issue.

What steps can reproduce the bug?

SSH into a remote Linux host.

Start Codex CLI in a large project:

cd ~/Simulation/OpenFOAM-dev
codex
Use gpt-5.5.

Work in the same remote session until the context becomes large enough for automatic compaction.

Let automatic compaction run.

Observe that remote compaction can fail with compact_error=request timed out.

Thread id:

Unavailable / redacted.

What is the expected behavior?

Codex should either:

complete automatic context compaction successfully, or fail quickly with a recoverable error and preserve enough state for the user to continue, or expose a reliable context usage indicator so users can manually summarize before auto-compaction is triggered.

Additional information

Current workaround:

keep Codex CLI on the latest stable version; avoid letting gpt-5.5 long sessions reach automatic compaction; manually write a digest before the context gets too large; start a fresh session from that digest; switch to a lower model temporarily if a long session is already near compaction failure.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Remote CLI auto-compact times out on gpt-5.5 long sessions