Summary
Codex WebSocket transport to wss://chatgpt.com/backend-api/codex/responses consistently fails in my environment.
The websocket handshake succeeds (101 Upgrade), then the server immediately sends a close frame with code 1008 (Policy) and empty reason. Codex retries 5 times and falls back to HTTPS.
This blocks websocket transport usage for realtime/voice related features.
Environment
- OS: Arch Linux (
x86_64), kernel 6.18.9-arch1-2
- Codex CLI:
0.106.0
- Also tested:
0.107.0-alpha.5 (same result)
- Node:
v25.7.0
- npm:
11.10.1
- Auth mode: ChatGPT login (
codex login status => Logged in using ChatGPT)
- Feature flags:
responses_websockets_v2 = true
realtime_conversation = true
voice_transcription = true
Repro steps
- Enable websocket + realtime + voice feature flags.
- Run:
codex exec -C /home/arch --skip-git-repo-check --json "Reply with exactly: WS_FINAL_CHECK"
- Observe reconnect loop and fallback.
Expected
WebSocket connection remains open and request/stream proceeds over websocket transport.
Actual
- Repeated:
Reconnecting... 2/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)
- through
5/5
- Then:
Falling back from WebSockets to HTTPS transport. stream disconnected before completion: failed to send websocket request: Connection closed normally
Trace evidence
Sanitized trace (auth redacted) shows successful websocket upgrade followed by immediate policy close:
2026-02-27T18:27:54.791212Z INFO ... connecting to websocket: wss://chatgpt.com/backend-api/codex/responses
2026-02-27T18:27:55.174925Z INFO ... successfully connected to websocket: wss://chatgpt.com/backend-api/codex/responses
2026-02-27T18:27:55.176795Z DEBUG tungstenite::protocol: Received close frame: Some(CloseFrame { code: Policy, reason: Utf8Bytes(b"") })
...
Reconnecting... 5/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)
... Falling back from WebSockets to HTTPS transport ...
Additional notes
- Reproduces across many attempts/sessions.
- Same behavior with
responses_websockets (legacy) and responses_websockets_v2.
- No local proxy env vars configured.
- This looks like server-side policy rejection after successful upgrade.
Request
Please help identify why this account/session is policy-closed (1008) for Codex responses websocket, and whether there are account entitlements/conditions required for websocket transport.
Summary
Codex WebSocket transport to
wss://chatgpt.com/backend-api/codex/responsesconsistently fails in my environment.The websocket handshake succeeds (
101 Upgrade), then the server immediately sends a close frame with code1008(Policy) and empty reason. Codex retries 5 times and falls back to HTTPS.This blocks websocket transport usage for realtime/voice related features.
Environment
x86_64), kernel6.18.9-arch1-20.106.00.107.0-alpha.5(same result)v25.7.011.10.1codex login status=> Logged in using ChatGPT)responses_websockets_v2 = truerealtime_conversation = truevoice_transcription = trueRepro steps
Expected
WebSocket connection remains open and request/stream proceeds over websocket transport.
Actual
Reconnecting... 2/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)5/5Falling back from WebSockets to HTTPS transport. stream disconnected before completion: failed to send websocket request: Connection closed normallyTrace evidence
Sanitized trace (auth redacted) shows successful websocket upgrade followed by immediate policy close:
Additional notes
responses_websockets(legacy) andresponses_websockets_v2.Request
Please help identify why this account/session is policy-closed (
1008) for Codex responses websocket, and whether there are account entitlements/conditions required for websocket transport.