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
Keep running into "Error running remote compact task" #23050
What terminal emulator and version are you using (if applicable)?
iTerm2 + TMUX
Codex doctor report
not available
What issue are you seeing?
All day I have experienced longer running sessions ending mid session with "■ Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)". Only remedy is to restart codex and start over, cant resume session.
i get this every single time it tries to do an automated compact, then it dies and nothing works, have to restart sessions fresh which is super frustrating.
Compaction should be a resumable operation with its own attempt record.
Before calling the remote compact endpoint, persist compact_attempt_id, source turn range, source hash, previous context pointer, and status started. If the stream disconnects, resume can either retry that attempt or keep using the pre-compact context, instead of leaving the whole session unrecoverable.
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 May 16, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
snissn commentedon May 16, 2026
#22107 (comment)
wifiuk commentedon May 18, 2026
i get this every single time it tries to do an automated compact, then it dies and nothing works, have to restart sessions fresh which is super frustrating.
WolfgangSenff commentedon May 19, 2026
I've been getting this every time as well. It happens also when I do /compact manually.
Necmttn commentedon Jun 21, 2026
Compaction should be a resumable operation with its own attempt record.
Before calling the remote compact endpoint, persist
compact_attempt_id, source turn range, source hash, previous context pointer, and statusstarted. If the stream disconnects, resume can either retry that attempt or keep using the pre-compact context, instead of leaving the whole session unrecoverable.That turns compact failure into a bounded state.
Generated with ax.
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.