Remote compact task timeout -> session becomes unrecoverable (resume also hangs)
What version of Codex CLI is running?
0.117.0
What subscription do you have?
ChatGPT Go
Which model were you using?
gpt-5.4 xhigh
What platform is your computer?
Linux 6.17.0-19-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
GNOME Terminal (zsh)
What issue are you seeing?
Codex CLI consistently fails during the automatic context compaction phase when the context usage drops from ~100% to ~10–20%.
Error:
Error running remote compact task: timeout waiting for child process to exit
After this happens:
Retrying does not work
The session becomes stuck
Restarting the terminal does not fix it
Attempting to resume the session also hangs indefinitely
Example:
codex resume 019d3ffb-e428-79d1-99c3-17d5052fe1a6
This command never completes and appears to freeze.
Additionally:
The session becomes completely unusable after failure
There is no way to recover past context
The only workaround is to start a new Codex session from scratch, losing all previous progress
What steps can reproduce the bug?
Uploaded thread: 019d3ffb-e428-79d1-99c3-17d5052fe1a6
Start a Codex session on a medium/large multi-file project
Perform multiple steps (planning, edits, reasoning)
Let context grow close to 100%
Wait for automatic compaction to trigger
Observe failure during compact phase
After failure:
Try retry -> stuck
Restart terminal -> still stuck
Run codex resume <thread_id> -> hangs indefinitely
What is the expected behavior?
Context compaction should complete successfully
If compaction fails, session should still be recoverable
codex resume should always restore the session instead of hanging
Additional information
Issue seems correlated with large context size and long sessions
Failure happens exactly during compaction (context drop phase)
After failure, session appears to be in a corrupted or locked state
Resume functionality does not recover the session
Similar timeout/child-process issues have been reported in Codex CLI related to subprocess handling ()
Blocks long-context workflows entirely
Forces restarting from scratch after failure
Causes complete loss of session context and progress
Makes Codex CLI unreliable for larger or multi-step projects
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗