Remote compact task timeout -> session becomes unrecoverable (resume also hangs)

Resolved 💬 2 comments Opened Mar 30, 2026 by priyanshuchawda Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14860
  • #14783
  • #14587
  • #16039
  • #14559

Powered by Codex Action

etraut-openai contributor · 1 month ago

Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.