Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
Resolved 💬 8 comments Opened Mar 9, 2026 by xi203040 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?
codex-cli 0.112.0
What subscription do you have?
team
Which model were you using?
gpt-5.4 xhigh
What platform is your computer?
Linux 5.15.0-78-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Terminal
What issue are you seeing?
Error running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)
What steps can reproduce the bug?
Uploaded thread: 019cd09e-b9f2-7313-b289-259a2be574f8
When the Context window is insufficient, automatic compression is performed.
What is the expected behavior?
The expected outcome is successful automatic compression, not an error message.
Additional information
_No response_
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
same problem, thread ID 019cdcf1-59d7-7611-b1f9-abdf08a02deb
This it probably related to the too short timeout fix I just submitted https://github.com/openai/codex/issues/14860
me too
019d4ab1-0351-71a0-ba05-ec95238f5cb6
Same. 019d73db-6765-7791-ab1e-94c90192b7d6
What I paid subscription for?
<img width="873" height="698" alt="Image" src="https://github.com/user-attachments/assets/269efc78-f73f-4991-9f31-e528293dad95" />
In
~/.codex/config.tomlPut
stream_idle_timeout_ms = 300000It puts a three minutes timeout on it. If you are on Linux it's currently 30 seconds. The 150 seconds it seems to take is only because it retries 5 times.
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.