Skip to content

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

Open

Description

@krastop124-cpu

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:

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.

Activity

  1. added
    bug
    app
    windows-os
    connectivity
    auth
    on Aug 27, 2026
  2. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. GuZhuJun commented on Aug 30, 2026

    @GuZhuJun

    Additional reproduction on a newer Windows build.

    Environment

    • Windows desktop client
    • Codex Desktop app version: 26.825.51511
    • Remote Control endpoint: wss://chatgpt.com/backend-api/wham/remote/control/server

    Result

    The failure is still reproducible after forcing a fresh local enrollment state.

    I verified the local state DB first:

    • state_5.sqlite passes PRAGMA quick_check
    • remote_control_enrollments initially contained exactly 1 row
    • I backed up the DB, deleted only that enrollment row, and verified the table had 0 rows
    • After restarting the app and enabling Remote Control again, the client logged that no persisted enrollment was found, then performed enrollment and persisted a new local enrollment row
    • The resulting row again had remote_control_enabled=1

    Immediately after enrollment, the WebSocket auth still fails with 403:

    INFO  ...remote_control::websocket
    connecting to app-server remote control websocket
    websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
    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
    error=remote control websocket auth failed with HTTP 403 Forbidden; refreshing server token before reconnect
    has_enrollment=true
    server_id=Some("<REDACTED_SERVER_ID>")
    environment_id=Some("<REDACTED_ENVIRONMENT_ID>")
    
    INFO  ...remote_control::websocket
    refreshing remote control server token:
    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>
    
    INFO  ...remote_control::websocket
    connecting to app-server remote control websocket
    has_enrollment=true
    
    WARN  ...remote_control::websocket
    error=remote control websocket auth failed with HTTP 403 Forbidden
    

    The retry loop continues with increasing reconnect backoff. The endpoint is reachable and returns an HTTP response, so this does not look like a TCP/TLS/WebSocket routing timeout.

    One additional observation: after deleting the local enrollment and enrolling again, the backend returned the same stable server/environment identity as before. That may be expected/idempotent server-side behavior, but the important point is that a fresh local enrollment cycle still leads immediately to the same WebSocket-auth 403.

    All account, installation, server, and environment identifiers are redacted.

  4. reclusep commented on Aug 31, 2026

    @reclusep

    I can reproduce the same Remote Control WebSocket authentication failure on a newer Windows build.

    Environment

    • Windows 11
    • ChatGPT Desktop / Codex & OWL
    • App version: 26.825.51511
    • Release date shown in app: 2026-08-30
    • Microsoft Store build

    Behavior

    Remote Control cannot be enabled.

    The UI may show:
    “Unable to enable remote control. Please make sure only one ChatGPT instance is running.”

    I verified the Windows process tree and there is only one root ChatGPT.exe process. The other ChatGPT.exe processes are normal renderer/GPU/utility/crashpad child processes, and codex.exe is the app-server child process of that same root instance.

    Relevant sanitized logs

    The Remote Control client is already enrolled:

    has_enrollment=true

    It repeatedly tries to connect to:

    wss://chatgpt.com/backend-api/wham/remote/control/server

    but authentication fails:

    remote control websocket auth failed with HTTP 403 Forbidden

    The client then refreshes the Remote Control server token and retries, but continues receiving HTTP 403.

    Typical sequence:

    connecting to app-server remote control websocket
    → remote control websocket auth failed with HTTP 403 Forbidden
    → refreshing remote control server token
    → reconnect
    → HTTP 403 again

    I also observed an occasional refresh failure:

    HTTP 503 Service Unavailable
    upstream connect error or disconnect/reset before headers
    remote connection failure
    Connection refused

    All account IDs, installation IDs, server IDs, environment IDs, local usernames, and other identifying values have been removed.

    This appears to be the same failure mode as this issue, but it is still reproducible on version 26.825.51511.

  5. murtest commented on Sep 3, 2026

    @murtest

    Confirming that this issue still reproduces on a newer Windows build.

    Environment

    • ChatGPT/Codex Desktop: 26.901.2854.0
    • Windows 11 x64
    • Microsoft Store package
    • Normal authenticated Codex chats work correctly
    • Only Remote Control setup fails before the QR code appears

    Current behavior

    The host enrollment succeeds and fresh server_id / environment_id values are created, but the Remote Control WebSocket authentication is rejected repeatedly:

    websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
    error=remote control websocket auth failed with HTTP 403 Forbidden;
    refreshing server token before reconnect
    has_enrollment=true
    server_id=Some("<REDACTED>")
    environment_id=Some("<REDACTED>")
    

    Latest reproduced failure:

    2026-09-03T20:44:08.654901Z
    

    The application refreshes the Remote Control server token, reconnects, and receives the same 403 Forbidden.

    Troubleshooting performed

    • Completely closed the application and verified that only one app instance was running
    • Reset and reinstalled the Microsoft Store application
    • Removed stale local Remote Control state and allowed the app to create a fresh installation/enrollment
    • Confirmed that normal authenticated backend requests and chats work

    All network paths produce the same Remote Control WebSocket authentication 403.

    Earlier attempts also occasionally produced the false-positive message asking to ensure that only one ChatGPT instance was running, despite there being only one process tree.

    This does not appear to be a DNS, VPN reputation, TCP connectivity, or WebSocket routing problem. The endpoint is reached, enrollment exists, and the failure occurs specifically while authenticating the refreshed server token.

    Could this be an entitlement, token claim/audience, selected-account/workspace, or backend enrollment-state mismatch? Please let me know if a sanitized request ID or additional diagnostic fields would help.

  6. aakonovalov commented on Sep 24, 2026

    @aakonovalov

    I can reproduce this on Windows 11 with a newer build as of 2026-09-24.

    Environment

    • Codex/About version: 26.917.71314
    • Windows AppX package: 26.917.9434.0 (x64)
    • Windows 11
    • ChatGPT authentication
    • MFA enabled

    The same UI symptom (Remote Control setup does not reach/show the pairing QR) occurs on two Windows 11 PCs. The detailed logs below are from one of them.

    Troubleshooting already tried

    • Enabled MFA on the ChatGPT account.
    • Fully signed out of Codex/ChatGPT Desktop.
    • Signed in again through the browser and completed the MFA challenge.
    • Re-opened Remote Control setup.
    • The failure persists.

    Relevant sanitized logs

    warning [remote-connections/window-context]
    refresh_local_remote_control_client_id_failed
    errorMessage="Sign in to ChatGPT to check remote control authorization."
    
    info [AppServerConnection]
    method=remoteControl/enable errorCode=-32600
    
    error [electron-message-handler]
    Request failed
    error={"code":-32600,"message":"remote control requires ChatGPT authentication"}
    method=remoteControl/enable
    
    info [chatgpt-account-lookup] completed
    authenticatedAccountPresent=true authMethod=chatgpt result=succeeded
    
    WARN [codex_app_server_transport::transport::remote_control::websocket]
    failed to connect to app-server remote control websocket
    websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
    error="remote control websocket auth failed with HTTP 403 Forbidden; refreshing server token before reconnect"
    reconnect_attempt=4 has_enrollment=true
    

    There is a clear contradiction: the desktop app reports a valid ChatGPT account (authenticatedAccountPresent=true, authMethod=chatgpt), while Remote Control says remote control requires ChatGPT authentication. Enrollment is already present (has_enrollment=true), but the Remote Control WebSocket is still rejected with HTTP 403.

    A prior log also contained:

    method=get routePattern=/wham/remote/control/mfa_requirement
    status=500 errorMessage=net::ERR_CONNECTION_RESET
    

    That MFA endpoint error was from an earlier session and may be unrelated; after MFA was enabled and a full sign-out/sign-in with MFA was completed, the 403 behavior remained.

    No tokens, account IDs, cookies, installation IDs, or other credentials are included here.

  7. svladimirov978-design commented on Oct 15, 2026

    @svladimirov978-design

    I am experiencing exactly the same Codex Remote Control issue on Windows.

    Environment:

    • Codex Windows app: 26.1007.9446.0
    • Installed via Microsoft Store
    • Normal Codex functionality works
    • MFA enabled

    Diagnostics:

    • has_enrollment=true
    • Remote Control WebSocket authentication repeatedly returns HTTP 403 Forbidden
    • Server token refresh does not resolve the issue
    • No enrollment or MFA-required errors detected

    I have already enabled MFA, fully signed out of Codex, restarted the app, and signed back in. The error persists.

    Could you please investigate this issue and provide a fix or workaround? I need Codex Remote Control to access my local Windows development environment from my iPhone.

  8. lunomaniaolga commented on Oct 16, 2026

    @lunomaniaolga

    Confirming this is still reproducible on my Windows PC (2026-10-16).

    • Codex desktop app: 26.1007.71326; standalone Codex CLI: 0.163.0.
    • Windows build: 26300.9711; personal ChatGPT workspace.
    • Settings → Connections → Control this PC fails before a pairing QR code appears. The UI sometimes says to ensure only one ChatGPT instance is running, although only one root instance is running.
    • The local Remote Control server starts and reports has_enrollment=true. Authentication to wss://chatgpt.com/backend-api/wham/remote/control/server repeatedly fails with remote control websocket auth failed with HTTP 403 Forbidden; refreshing server token before reconnect. Token refresh does not recover the connection.
    • I updated/repaired the desktop app, restarted Windows, signed out and back into the desktop app, performed a fresh Codex CLI device-code login, and reset the local device registration. The same 403 persists. Normal Codex chats work.

    I submitted diagnostic context via /feedback: no-active-thread-01a144b0-3ba3-73c2-8f9f-62ece347ab00. Could the team check whether Remote Control is enabled for this account and whether the server-side enrollment or token authorization is rejecting this device?

  9. thinganother675-lab commented on Nov 5, 2026

    @thinganother675-lab

    Additional reproduction on 2026-11-05, matching the enrolled-host WebSocket 403 described here.

    Environment:

    • Windows 11 Pro x64, build 26300.
    • Installed Codex Windows AppX package version: 26.1029.7803.0.
    • Native Codex CLI: 0.166.0.
    • Managed app-server daemon: installed and running 0.166.0 (verified with app-server daemon version).
    • Android ChatGPT client; exact mobile build not captured.

    Observed:

    • Desktop Connections > Control this PC reports that remote-control availability could not be updated; Allow connections remains off.
    • The CLI managed daemon is running and enable-remote-control reports alreadyEnabled.
    • Manual pairing produces a code, and the phone completes the flow far enough to list the PC. However, the host stays offline (gray indicator / Unable to connect). Pairing flow completion is not an end-to-end success.
    • Fresh daemon logs repeatedly show has_enrollment=true and:
      "remote control websocket auth failed with HTTP 403 Forbidden; refreshing server token before reconnect"
    • Automatic server-token refresh and retries do not recover the connection.

    Already tried:

    • Restarting/reopening the desktop app and signing in again.
    • Official managed-daemon upgrade from 0.160.0 to 0.166.0; all CLI/installed/running versions now match.
    • Enabling Remote through the official CLI and manual phone pairing.

    Useful comparison: a separate Ubuntu 24.04 VPS using Codex CLI/app-server 0.166.0, authenticated from a copy of this PC's original ChatGPT auth cache, successfully connects to the same phone and has working Remote sessions. This does not prove that the current refreshed tokens are byte-identical, but it suggests that general account access alone does not explain the Windows-host failure.

    We have not deleted enrollment rows or reset device identities. No raw auth cache, tokens, account/installation/server IDs, IP addresses, or private logs are included here.

    Is there a supported diagnostic or repair for per-host Remote enrollment/server-token authorization in this specific post-enrollment WebSocket 403 case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appauthbugconnectivityremotewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions