Guides ·
Codex stream disconnected before completion or Reconnecting: what to check
If Codex shows stream disconnected before completion, Reconnecting… or websocket closed by server before response.completed, treat it as an interrupted transport first, not an IP or account verdict. Inspect saved work, then separate official service status, one-chat state, client version and the WebSocket path.
Does stream disconnected before completion mean a bad IP?
No. The message says that a response stream ended without completing; it does not identify an IP-reputation or account-enforcement decision. OpenAI’s network guidance documents secure WebSockets for Codex sampling and streaming. Dated user reports in the official Codex repository describe similar failures on macOS, Windows, desktop and extensions, but those reports do not establish one shared root cause.
| What you see | What it supports | What it does not prove |
|---|---|---|
error sending request | The request or stream did not finish | An IP block or account restriction |
websocket closed… | The socket closed before completion | Client-side or server-side by itself |
| Another network works once | The path deserves comparison | The old exit had poor reputation |
What should I do immediately after a disconnect?
Preserve the result before retrying. Record the exact error, local time and time zone, request ID, Codex version and chat ID; then inspect the working tree and any destination system. For publishing, sending, payment or deletion steps, verify the external receipt before repeating anything.
codex --version git status --short git diff --check
Some dated reports in the official repository say local changes survived while the visible response stopped. That is user-reported behavior, not a promise that every interrupted turn preserved all work.
How do I separate a service incident, a stale chat and the network path?
Use three independent controls: the official status page, one minimal request in a fresh chat and a controlled test on another network. When checked on November 24, 2026, OpenAI Status said fully operational; that only means no matching incident was announced at that moment.
Which WebSocket and firewall settings matter?
Check WebSocket Upgrade over TCP 443, TLS inspection and long-connection limits. OpenAI’s official network recommendations identify wss://chatgpt.com/ for Codex sampling and streaming, and say proxies, firewalls and secure gateways must not block, rewrite or prematurely close the handshake or long-running connection.
- Allow
Upgrade: websockettochatgpt.comover TCP 443. - Check whether TLS inspection or SSL decryption rewrites certificates.
- Review WebSocket idle-timeout and maximum frame or message-size policies.
- Change one variable at a time and repeat the same small request.
Will updating Codex fix the disconnect?
Updating is worthwhile, but it is not a universal fix. The official Codex v0.170.0 release notes, published November 18, 2026, say oversized WebSocket requests now fall back to HTTP and Cloud conversations reconnect more reliably while preserving active recovery turns. Those fixes have defined scope; they do not prove that every desktop, CLI, proxy or service-side disconnect is resolved.
Should I abandon a chat that keeps Reconnecting?
Start fresh only after preserving the old chat and a short handoff. OpenAI’s Codex help page recommends stopping a task that repeatedly says Context automatically compacted without progress, then opening a new chat with the goal and completed work. Keep the original chat for evidence.
Frequently asked questions
Does one successful retry mean the issue is fixed?
No. It only shows that one connection completed; repeat under controlled conditions.
If another exit works, was the first IP blocked?
Not necessarily. DNS, routing, TLS state and the WebSocket connection all changed too.
Does a green status page prove a local fault?
No. Status is aggregate and may not show a short or narrow failure.
Should I keep sending “continue”?
Inspect local work and external receipts first; blind retries can repeat side effects.
When is an exit-IP check useful?
After service status, chat state, version and gateway policy are checked, and failures consistently follow the path, verify the actual terminal exit with the CLI exit check.
This article was checked on November 24, 2026 against OpenAI’s network recommendations, Codex help page, v0.170.0 release notes, status page and dated user reports in the official repository. Related: Codex CLI proxy settings · which IP AI services see · shared vs dedicated IP.
Which kind of IP do you have?
Check which exit my terminal uses