Keep running into "Error running remote compact task"
Resolved 💬 6 comments Opened May 16, 2026 by tbvl 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.130.0
What subscription do you have?
Pro plan 5x
Which model were you using?
gpt-5.5 xhigh
What platform is your computer?
Darwin 25.3.0 arm64 arm
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.
What steps can reproduce the bug?
Uploaded thread: 019e30c3-ffd7-7e43-b945-47a5b2d73ea6
What is the expected behavior?
_No response_
Additional information
_No response_
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
https://github.com/openai/codex/issues/22107#issuecomment-4468475796
<img width="1236" height="166" alt="Image" src="https://github.com/user-attachments/assets/7f770d8d-d022-49f7-9fd7-7558d2cd1fc1" />
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.
I've been getting this every time as well. It happens also when I do /compact manually.
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._
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.