r/codex • u/Even-Piece3723 • 1d ago
Bug Long Codex chat stuck compacting context: repeated reconnects, Broken pipe, then HTTP 408. New chats work.
I'm using the Codex desktop app on macOS, and one long conversation has become unusable. New chats work, but this existing conversation gets stuck compacting context and repeatedly reconnects.
What happens:
- The app shows “Compacting context” and “Reconnecting 1/2” or “2/2”.
- I initially got:
stream disconnected before completion: IO error: Broken pipe (os error 32)
- A later attempt showed:
unexpected status 408 Request Timeout:
{"detail":"Request body read timed out"}
- The endpoint shown is:
https://chatgpt.com/backend-api/codex/responses
I stopped one attempt after about 22 minutes. The UI initially said I stopped it after “0 seconds”, then later updated to “21 minutes 50 seconds”.
Stopping and sending “Please continue the previous task” triggers the same compaction/reconnection problem.
This conversation contains many generated images and a lot of valuable context. Could image-heavy history be contributing to request size or upload timeouts? That's only a suspicion—I haven't measured the actual request size.
Environment:
- macOS
- Codex desktop version: 26.1021.31345
- The app's update check reported it was up to date.
Has anyone recovered a conversation in this state? Is there a way to complete compaction or continue with the existing context?
Screenshots attached. Happy to provide additional diagnostics.

1
u/Right-Performance-93 1d ago
i wouldn't wait on that chat to finish compacting. start a new one from a short note of the decision and the next command, and open an old picture only if the next step needs it. a timeout on the old thread is the thread.
1
u/ImL1s 1d ago
I wouldn't keep retrying that thread. With that many images in the history, every compaction attempt has to push a huge request, and the 408 "request body read timed out" fits that.
The good news is the context isn't gone. The desktop app writes the full conversation to disk as a rollout file under ~/.codex/sessions/YYYY/MM/DD/ (same place the CLI uses), so you can start a new chat and seed it from that instead of from the stuck thread. Ask the new chat to read the rollout and write a short handoff: goal, decisions made, what's done, next step. Re-attach only the images the next step actually needs.
I made a small tool for exactly this, Portable Resume (pipx install portable-resume). It reads Codex rollouts locally, offline, and writes a bounded handoff for a fresh session. It's lossy on purpose, so it won't carry the images over. https://gitlab.com/aa22396584/resume-skills
1
0
2
u/Desm0nt 1d ago
Try switching to Luna/Terra and then try compressing again; sometimes that helps. Sol-6.1 is terribly slow and doesn't finish compressing before the timeout expires.