Remote CLI auto-compact times out on gpt-5.5 long sessions
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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗