Compaction/Autocompaction fails
Resolved 💬 10 comments Opened Apr 12, 2026 by alanxchen85 Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.409.20454 (1462)
What subscription do you have?
pro
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
<img width="1102" height="753" alt="Image" src="https://github.com/user-attachments/assets/3dcae9c3-59f4-4ba9-a75e-9f203531f0df" />
autocompaction gets stuck at this and sends error: 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: 019d7927-56b7-7110-99a9-05daa49544de
in this thread max context is 760k, also happens at 1mm
This is not consistent. sometimes happens sometimes doesn't. sometimes if you keep prompting it you can even get it going again.
What is the expected behavior?
finish autocompaction
Additional information
Bug has been around for a while
10 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
autocompact fails for me too: 019db1fd-7d09-7370-bea2-7e518769131e and shows ■ Error running remote compact task: stream disconnected before completion: error sending request for url (https://api.openai.com/v1/responses/compact)
no fix? how to fix?
+1, almost consistently failing for me starting today
this is making the 5.5 update completely unuasble, especially given that 5.5 only is 258k tokens right now even with settings to 400k. autocompaction gets stuck -> copy thread id for a new session to resume, one turn it its autocompaction again. completely unusable right now. @etraut-openai pls fix thnx!
Additional live occurrence on 2026-04-24:
This still happens during real coding work. The failure mode is not just slow compaction; the thread gets stuck in the autocompaction transition and needs manual steering / additional prompts to become usable again.
Observed today:
So there seem to be two related failure surfaces:
stream disconnected before completion.Expected behavior:
A useful diagnostic would be exposing whether the failure happened in:
/backend-api/codex/responses/compactTo be clear, after testing, this is not autocompaction failing, this is compaction failing in general. I get this error when invoking compaction manually (now that it's available) as well!
Also having same issue, compaction fails in codex app, but not in cli, not sure why @etraut-openai keeps removing the app label from these issues, where clearly it is a codex app issue.
It happens in the CLI for me only. Perhaps it's different for you.
On Fri, Apr 24, 2026, 12:39 p.m. hchafiatheal @.***>
wrote:
Getting the same issue - 019dea5d-63bc-7a52-acf0-48000ae08f95
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.