stream disconnected before completion
There is no single confirmed fix. Community-reported mitigations, roughly in order of payoff: retry the task (disconnects are often transient), split long-running jobs into shorter tasks so less work is lost mid-stream, check OpenAI's status page for an active incident before debugging your own setup, and update the CLI — releases ship near-daily, and stream-handling fixes land without much fanfare.
Affected versions: recurring across releases; no single fixed-in version confirmed
Long-running Codex sessions — CLI and cloud alike — sometimes end early with stream disconnected before completion. The session stops mid-generation, and whatever the agent was doing is left partially applied. Stream disconnects are a recurring class of reports on the openai/codex issue tracker, resurfacing across releases rather than tracing back to one fixed bug.
Symptoms
- A CLI or cloud session stops before the model finishes responding, and the task exits with this error.
- Work in flight is left incomplete — because the disconnect interrupts generation, the longest tasks lose the most.
- The reports recur across CLI versions; the issue tracker shows an ongoing stream of them rather than one closed thread.
What causes it?
OpenAI has not published a single root cause, and the open reports do not point to one. What is documented: stream disconnects are a recurring pain point on the openai/codex tracker, and long-session reliability is under active public scrutiny — on July 4, 2026, a raw GitHub issue titled “GPT-5.5 Codex reasoning-token clustering may be leading to degraded performance” reached the Hacker News front page with 370 points. Treat this error as a live, publicly tracked problem class, not something broken on your machine.
How do you fix it?
There is no verified permanent fix, so these are community-reported mitigations in the order we’d try them:
- Retry the task. Reporters describe disconnects as intermittent — the same task frequently completes on a second run.
- Split long jobs into shorter tasks. Less time streaming means less exposure to a mid-stream drop, and less work lost when one happens.
- Check OpenAI’s status page. If there’s an active incident, no local change will help — wait it out and retry.
- Update the CLI. Releases ship near-daily — 903 releases since April 2025, with v0.144.0 landing July 9, 2026 — and stream-handling improvements can arrive without a headline changelog entry.
- Add your report. If it reproduces, file or comment on a GitHub issue with logs. This class of error gets attention when reports cluster.
Which versions are affected?
There is no clean answer here. Reports of stream disconnects span multiple CLI versions, and we have not found a release note that marks this class of error definitively fixed. We’ll update this page when one appears.
Facts on this page verified July 9, 2026.