openai / openai/codex

[Windows][Remote Control] WebSocket auth repeatedly returns HTTP 403 after successful enrollment

Open
#41,121 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app auth bug connectivity remote windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What happened?

Remote Control cannot be enabled in the current ChatGPT/Codex Desktop Windows app. The UI reaches the final Allow devices to control this computer step, then reports:

Unable to enable remote control. Try again.

The local logs show that enrollment already exists and the client can reach the Remote Control WebSocket endpoint, but WebSocket authentication is rejected with HTTP 403 Forbidden. The client refreshes the server token and retries repeatedly, but every retry receives the same 403.

This appears distinct from the known MFA enrollment failure (#23977): in this case has_enrollment=true, and the 403 occurs during WebSocket authentication, not /server/enroll.

Environment
  • Windows 11 Pro
  • ChatGPT Desktop installed from Microsoft Store
  • App version: 26.820.71523 (2026-08-27)
  • ChatGPT Plus / Personal account
  • MFA is configured (Google Authenticator has been used for sign-in)
  • Computer Use is available and enabled when using the supported network path
  • App was reset/reinstalled and the PC/app restarted; behavior persists
Steps to reproduce
  1. Open ChatGPT Desktop on Windows.
  2. Sign in to the ChatGPT account.
  3. Open Settings → Connections → device controlling this PC / Remote Control.
  4. Choose Add device → Start.
  5. Confirm Allow devices to control this computer.
  6. Wait several seconds.
  7. UI reports that Remote Control could not be enabled.
Relevant sanitized logs
INFO  ...remote_control::websocket
connecting to app-server remote control websocket
websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
reconnect_attempt=9
has_enrollment=true
server_id=Some("<REDACTED_SERVER_ID>")
environment_id=Some("<REDACTED_ENVIRONMENT_ID>")
app_server_client_name=Some("Codex Desktop")

WARN  ...remote_control::websocket
failed to connect to app-server remote control websocket
websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
installation_id=<REDACTED_INSTALLATION_ID>
error=remote control websocket auth failed with HTTP 403 Forbidden; refreshing server token before reconnect
error_kind=Other
reconnect_attempt=9
has_enrollment=true
server_id=Some("<REDACTED_SERVER_ID>")
environment_id=Some("<REDACTED_ENVIRONMENT_ID>")

INFO  ...remote_control::websocket
refreshing remote control server token:
websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
refresh_url=https://chatgpt.com/backend-api/wham/remote/control/server/refresh
account_id=<REDACTED_ACCOUNT_ID>
server_id=<REDACTED_SERVER_ID>
environment_id=<REDACTED_ENVIRONMENT_ID>

WARN  ...remote_control::websocket
failed to connect ...
error=remote control websocket auth failed with HTTP 403 Forbidden
reconnect_attempt=10
reconnect_delay=30s
has_enrollment=true

The same session can make normal authenticated Codex backend requests successfully (for example /backend-api/codex/models returns 200 OK), so general ChatGPT/Codex authentication and connectivity are working.

Important distinction

This does not look like a TCP/WebSocket routing failure: the Remote Control endpoint is reached and returns an HTTP response.

It also does not match the MFA enrollment 403 documented in #23977:

  • #23977: /remote/control/server/enroll → 403 with Multi-factor authentication required
  • This case: enrollment already exists (has_enrollment=true), then /remote/control/server WebSocket authentication → 403
  • Refreshing the Remote Control server token does not recover the connection.
Expected behavior

After successful enrollment, the refreshed server token should authenticate the Remote Control WebSocket and the PC should become available for remote control.

Actual behavior

The server token is refreshed, but WebSocket authentication continues to return HTTP 403 indefinitely.

All account IDs, installation IDs, server/environment IDs, cookies, and other identifying values above have been redacted.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the remote-control WebSocket endpoint and the server-token refresh endpoint named in the report, comparing their behavior with the existing enrollment state. Verify the refreshed token is accepted for WebSocket authentication after enrollment, and confirm the Windows client connects instead of retrying with HTTP 403.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.