Codex: stream disconnected before completion

Codex's streaming connection to the model backend (chatgpt.com/backend-api/codex/responses when signed in with ChatGPT, otherwise the Responses API) closed before the response finished. The exact message, why Codex prints it, and the fix.

Updated November 23, 2026

The message

stream disconnected before completion

What it means

Codex’s streaming connection to the model backend (chatgpt.com/backend-api/codex/responses when signed in with ChatGPT, otherwise the Responses API) closed before the response finished. The text after the colon names the transport failure. Network drops, proxies or VPNs that cut long-lived streams and backend incidents all produce it, and in long sessions it often hits the remote compaction of a large context.

Fix

  1. Send the message again, or type ‘continue’; Codex already retried a few times before showing the error.
  2. If it keeps happening in one long session, start a new chat; reports tie it to sessions that have built up a large context and fail during remote compaction.
  3. If you’re behind a proxy, VPN or corporate firewall, check that it allows long-lived streaming connections to chatgpt.com and api.openai.com.
  4. Update Codex to the latest release.

In an EnvHaven workspace

Yes: provider limits and outages apply wherever Codex runs. In a workspace, an agent from another provider is one tap away in the Launch menu, on the same files, and the status page shows whether the provider is having trouble.

Where this comes from

From Codex’s documentation and issue tracker: