Skip to main content
Watch: Anthropic Just Hit the Brakes on Its Next AI Model

OpenAI Codex CLI error

Codex CLI: stream disconnected before completion: error sending request for url...

Error message
stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)

Status: OpenLast verified 3 documented fixes3 sources

What it means

Codex could not send the request to the Codex responses endpoint at all, so it shows "Reconnecting" and fails after its retry attempts.

Causes

  • A contributor on #13245: from uploaded logs this looks like a basic network connectivity issue; seen frequently with VPNs and proxies, or simple connection flakiness.
  • A contributor also asked users without a VPN whether a corporate proxy or firewall was in the path (#13245).

How to fix it

  1. Fix 1.

    Check VPNs, proxies, corporate proxies and firewalls between your machine and chatgpt.com (a contributor on #13245).

  2. Fix 2.

    If your network uses a corporate TLS proxy or private root CA, point Codex at the PEM bundle; the same CA settings apply to login, normal HTTPS requests and secure WebSocket connections (official auth docs).

    Terminal
    export CODEX_CA_CERTIFICATE=/path/to/corporate-root-ca.pem
  3. Fix 3.

    If it persists, run /feedback to send logs to the Codex maintainers (official slash command docs).

    Slash command
    /feedback

More Codex CLI errors

All 14 Codex CLI errors

FAQ

What does "stream disconnected before completion: error sending request for url..." mean in Codex CLI?

Codex could not send the request to the Codex responses endpoint at all, so it shows "Reconnecting" and fails after its retry attempts.

How do I fix "stream disconnected before completion: error sending request for url..."?

There are 3 documented fixes. Start with the first: Check VPNs, proxies, corporate proxies and firewalls between your machine and chatgpt.com (a contributor on #13245).

Is this Codex CLI error fixed?

Status: Open. Still open upstream. Any documented fixes are workarounds so far. Affected versions: Reported March 2026 (#13245); no version-specific fix announced

Sources

Last verified against 3 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.