ChatGPT-auth WebSocket transport always falls back to HTTPS on Linux (0.106.0 + 0.107.0-alpha.8)
Resolved 💬 3 comments Opened Mar 1, 2026 by any-0 Closed Mar 1, 2026
Summary
ChatGPT-auth websocket transport fails consistently on Linux, then Codex falls back to HTTPS.
Reproduces on:
codex-cli 0.106.0codex-cli 0.107.0-alpha.8
Environment
- OS: Arch Linux
- Shell: zsh
- Terminal: tmux 3.6a
- Auth mode:
Logged in using ChatGPT
Expected behavior
Codex keeps websocket transport for streaming responses.
Actual behavior
On startup/user turn:
- websocket prewarm fails
- sampling retries 5 times
- transport falls back to HTTP/HTTPS
Observed log patterns in ~/.codex/log/codex-tui.log:
startup websocket prewarm setup failed: stream disconnected before completion: failed to send websocket request: Connection closed normally
stream disconnected - retrying sampling request (1/5 ...)
...
codex_core::client: falling back to HTTP
Also observed:
startup websocket prewarm setup failed: stream disconnected before completion: websocket closed by server before response.completed
Minimal repro
codex login statusreturnsLogged in using ChatGPT- Start
codex - Enter
test - See banner:
Falling back from WebSockets to HTTPS transport...
WS feature-flag variants tested
responses_websockets=true,responses_websockets_v2=trueresponses_websockets=false,responses_websockets_v2=trueresponses_websockets=true,responses_websockets_v2=false
All combinations still fall back.
Diagnostics already done
- Unset proxy env vars (
HTTP_PROXY,HTTPS_PROXY,ALL_PROXY, plus lowercase variants) - Relogin ChatGPT auth (
codex logout,codex login --device-auth) - Tested stable and alpha side-by-side binaries
- Tested both IPv4 and IPv6 reachability to
chatgpt.com - Raw curl websocket-upgrade probes to
https://chatgpt.com/backend-api/codex/responsesover IPv4 and IPv6 both return HTTP500(connectivity/TLS works, but no successful upgrade in this unauthenticated probe)
Versions
$ codex --version
codex-cli 0.106.0
$ ~/codex-test/0.107.0-alpha.8/codex --version
codex-cli 0.107.0-alpha.8
$ codex login status
Logged in using ChatGPT
Hypothesis
Issue appears specific to ChatGPT-auth websocket path (not resolved by version bump to current alpha in this environment).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗