You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error running remote compact task: timeout waiting for child process to exit #14587
I’m also hitting this on Linux with the latest stable CLI, and it is breaking resume/continuation of long-running threads.
Environment
Codex CLI: 0.118.0
Install method: global npm package @openai/codex
OS: Ubuntu Linux
Model: gpt-5.4
Problem
Long-running interactive sessions repeatedly fail with:
Error running remote compact task: timeout waiting for child process to exit
This is not isolated to one repo. It has happened across unrelated projects on the same machine and can leave the affected thread effectively unusable.
What I observed locally
The exact error has occurred 24 times in ~/.codex/log/codex-tui.log.
It reproduces across multiple sessions/projects.
Example affected session id: 019d77ed-a71a-72a1-9a6f-7d2587adb2c4
Resume is not a reliable recovery path once a thread gets into this state. The next turn can hit the same compaction failure again.
Representative log details
From ~/.codex/log/codex-tui.log:
codex_core::compact_remote: remote compaction failed ... compact_error=timeout waiting for child process to exit
Why this looks like a Codex bug rather than local corruption
0.118.0 is already the latest stable npm release here.
The failure pattern is consistent across different projects.
Resume does not consistently recover the thread.
From upstream source, the compaction teardown path appears to have a 10-second shutdown timeout, which may be too aggressive for this case.
Impact
Long threads become fragile or effectively unusable.
codex resume <session-id> is not dependable once the thread is affected.
This causes real work loss because the user cannot continue the same conversation even after restarting.
Partial workaround
I lowered model_auto_compact_token_limit in ~/.codex/config.toml so compaction happens earlier on future turns/threads. That may reduce recurrence, but it does not reliably recover already-affected
threads.
Requested improvement
Fix the compaction-thread shutdown timeout path on Linux.
Make resume more resilient for already-affected threads.
If compaction shutdown times out, a degraded but resumable recovery path would be much better than leaving the thread stuck.
I have a ready fix for the compaction failure path reported here, but openai/codex is currently collaborators_only for PR creation, so I cannot open the PR directly from my account.
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.
Activity
github-actions commentedon Mar 13, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
initpwn commentedon Mar 19, 2026
#14860
minanagehsalalma commentedon Apr 10, 2026
I’m also hitting this on Linux with the latest stable CLI, and it is breaking resume/continuation of long-running threads.
Environment
0.118.0@openai/codexgpt-5.4Problem
Long-running interactive sessions repeatedly fail with:
Error running remote compact task: timeout waiting for child process to exitThis is not isolated to one repo. It has happened across unrelated projects on the same machine and can leave the affected thread effectively unusable.
What I observed locally
~/.codex/log/codex-tui.log.019d77ed-a71a-72a1-9a6f-7d2587adb2c4Representative log details
From
~/.codex/log/codex-tui.log:codex_core::compact_remote: remote compaction failed ... compact_error=timeout waiting for child process to exitOne representative instance logged:
last_api_response_total_tokens=238609all_history_items_model_visible_bytes=788672failing_compaction_request_model_visible_bytes=803365model_context_window_tokens=Some(258400)Why this looks like a Codex bug rather than local corruption
0.118.0is already the latest stable npm release here.Impact
codex resume <session-id>is not dependable once the thread is affected.Partial workaround
I lowered
model_auto_compact_token_limitin~/.codex/config.tomlso compaction happens earlier on future turns/threads. That may reduce recurrence, but it does not reliably recover already-affectedthreads.
Requested improvement
resumemore resilient for already-affected threads.minanagehsalalma commentedon Apr 11, 2026
I have a ready fix for the compaction failure path reported here, but
openai/codexis currentlycollaborators_onlyfor PR creation, so I cannot open the PR directly from my account.Branch:
minanagehsalalma:fix/remote-compact-timeout-recoveryCommit:
ea2504064Compare: https://github.com/openai/codex/compare/main...minanagehsalalma:fix/remote-compact-timeout-recovery?expand=1
This patch addresses both the misleading timeout surfaced in this issue and the large-session remote compaction timeout path tracked in #14860.
What the patch does:
CodexErr::RequestTimeoutValidation I ran locally:
compact_remote: 25 passed, 1 ignoredcompact_resume_fork: 4 passedrequest_compression: 4 passedPrebuilt binary handoff:
Credit:
Routing note:
If a collaborator is willing, please open the PR from the compare link above so it can be reviewed and linked back to these issues.
etraut-openai commentedon Jun 29, 2026
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
/feedbackand open a new bug report.