/realtime fails with 403 on Windows PowerShell: failed to connect realtime websocket

Resolved 💬 4 comments Opened Feb 28, 2026 by rlaehrb1 Closed Feb 28, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

/realtime fails immediately with:

stream disconnected before completion: failed to connect realtime websocket: HTTP error: 403 Forbidden

This happens even after re-authenticating with ChatGPT device auth.

Environment

  • OS: Windows (PowerShell)
  • Codex CLI: 0.106.0
  • Install method: npm install -g @openai/codex
  • Auth mode: ChatGPT login (codex login --device-auth)
  • Working directory example: C:\Users\27613\OneDrive\바탕 화면\codex (contains non-ASCII path segments)

Reproduction

  1. Run codex
  2. Re-login with codex login --device-auth
  3. In TUI, run /realtime
  4. Error appears immediately:
  • stream disconnected before completion: failed to connect realtime websocket: HTTP error: 403 Forbidden

Current feature flag state

From codex features list:

  • realtime_conversation: under development, enabled (true in config)
  • responses_websockets_v2: under development, enabled (true in config)
  • responses_websockets: disabled (false)

Expected behavior

/realtime should connect successfully (or provide a clear actionable message if account rollout/permission is missing).

Actual behavior

Realtime websocket handshake fails with HTTP 403 and conversation does not start.

Additional context

  • Re-login did not resolve the issue.
  • I am using Windows + PowerShell.
  • Could this be account/rollout gating for realtime_conversation / websocket v2?
  • If so, can CLI detect this case and show a clearer message than generic websocket 403?

Question to maintainers

Is this a known gating behavior, or should this work on 0.106.0 for all ChatGPT-authenticated users?

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 6 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13041
  • #13039
  • #11682

Powered by Codex Action

rlaehrb1 · 6 months ago

Thanks for the duplicate suggestions.

I reviewed #13041, #13039, and #11682 in detail.

My case appears related but not identical:

  • #13041/#13039: websocket upgrade succeeds, then server closes with code 1008 (Policy)
  • My case (#13124): websocket connect fails at handshake with HTTP 403 Forbidden (failed to connect realtime websocket: HTTP error: 403 Forbidden)

So this seems like the same feature area but a different failure mode (403-at-connect vs 1008-after-connect).

If preferred, I can keep this issue open only as a 403 variant linked to #13041, or close and move discussion to #13041 with this distinction noted.

kali113 · 6 months ago

@rlaehrb1 i think you should centralize to #13041

rlaehrb1 · 6 months ago

Centralizing into #13041 for tracking. This issue is the same feature-area failure but with a 403-at-handshake variant; details added there.