Repository navigation
Description
What happened?
Codex Remote Control is enabled on a Linux host, but it cannot establish the Remote Control WebSocket connection. codex remote-control start --json consistently reports:
Error: Remote control is enabled on <HOSTNAME> but the connection is errored.
The Remote Control transport logs show repeated Connecting -> Errored transitions because the WebSocket endpoint returns HTTP 503 Service Unavailable:
websocket_url=wss://chatgpt.com/backend-api/wham/remote/control/server
error=failed to connect app-server remote control websocket:
HTTP error: 503 Service Unavailable
cf-ray: <REDACTED>-ATH
body: upstream connect error or disconnect/reset before headers.
reset reason: connection termination
error_kind=Other
has_enrollment=true
server_id=Some("<REDACTED>")
environment_id=Some("<REDACTED>")
This repeats indefinitely with exponential reconnect backoff up to 30s.
This appears distinct from #41121, where the Remote Control WebSocket is reached but authentication returns HTTP 403. Here, enrollment exists and the failure is an upstream 503 before the WebSocket handshake completes.
Environment
- Fedora 44.0.0, x86_64
- Codex CLI:
0.153.4 - Managed Codex:
0.153.4 - app-server:
0.153.4 - app-server daemon: running in persistent mode
- Auth mode: ChatGPT
- No proxy environment variables
- Remote Control enrollment already exists and is reused
codex doctor --all --ascii --no-color reports:
[ok] state databases healthy
[ok] auth auth is configured
[ok] app-server running (persistent mode)
[ok] network no proxy env vars
[!!] websocket Responses WebSocket failed; HTTPS fallback may still work
endpoint wss://chatgpt.com/backend-api/<redacted>
DNS 2 IPv4, 2 IPv6, first IPv4
handshake transport error http 503 Service Unavailable:
upstream connect error or disconnect/reset before headers.
reset reason: connection termination
[ok] reachability active provider endpoints are reachable over HTTP
The separate Codex Responses WebSocket (wss://chatgpt.com/backend-api/codex/responses) is also returning the same class of HTTP 503 upstream error at the same time, while HTTPS reachability remains healthy.
Steps to reproduce
- Have Remote Control already enabled/enrolled on the host.
- Run:
codex remote-control stop
codex remote-control start- Observe:
Error: Remote control is enabled on <HOSTNAME> but the connection is errored.
- Restart the persistent app-server daemon:
codex app-server daemon restart
sleep 3
codex app-server daemon version
codex remote-control start --json-
The daemon restarts successfully and all component versions match, but Remote Control still reports
connection is errored. -
codex remote-control pair --jsonsucceeds and returns a pairing code/environment ID, indicating that pairing RPC functionality is available. -
Inspecting the Remote Control transport logs shows repeated HTTP 503 responses from:
wss://chatgpt.com/backend-api/wham/remote/control/server
with Cloudflare traffic terminating at the ATH POP and body:
upstream connect error or disconnect/reset before headers. reset reason: connection termination
Expected behavior
The enrolled app-server should establish the Remote Control WebSocket and become available for remote control.
Actual behavior
The Remote Control WebSocket repeatedly returns HTTP 503 and transitions from Connecting to Errored. Restarting the app-server daemon does not recover it.
Additional notes
- Enrollment is present (
has_enrollment=true) and persisted enrollment is reused. - Server token refresh is attempted normally.
- No
401,403, or409is observed. - State databases pass integrity checks.
- CLI, managed Codex, and app-server are all exactly
0.153.4. - HTTPS provider endpoints remain reachable.
- Account ID, installation ID, server ID, environment ID, hostname, and full Cloudflare Ray IDs are intentionally redacted.
Activity
ktogias commentedon Sep 9, 2026
Additional datapoint from the same affected Linux host:
The interactive Codex CLI itself is also hitting a 503 on the Codex Responses WebSocket and falling back to HTTPS:
This is occurring at the same time that the separate Remote Control WebSocket
repeatedly returns the same class of
503 Service Unavailable / upstream connect error or disconnect/reset before headers / connection terminationerrors.So the CLI can continue operating only because the Responses path has an HTTPS fallback, whereas Remote Control remains
Erroredbecause its WebSocket transport does not recover via an equivalent fallback.This further suggests the issue is not limited to Remote Control enrollment/state, but may affect the WebSocket path from this client/region to ChatGPT upstream services. Both observed failures are being served through the Cloudflare ATH POP.
leoxsantana commentedon Sep 10, 2026
Additional Windows datapoint from Brazil (Cloudflare GRU):
The desktop UI reports:
Pairing code unavailable: Remote control failed to connectAt
2026-09-09T22:08:52.637Z, after six reconnect attempts, the Remote Control transport failed at:wss://chatgpt.com/backend-api/wham/remote/control/serverwith:
HTTP 503 Service Unavailableupstream connect error or disconnect/reset before headers. reset reason: connection terminationCloudflare Ray ID:
a389839b4e23c6ce-GRUThe same event reported
has_enrollment=true. A redactedcodex doctorrun shows:I restarted the desktop app and reproduced the failure on a second independent connection/mobile hotspot. The result did not change. Process inspection also shows one real desktop-app root process; the other ChatGPT processes are normal child/helper processes.
This Windows reproduction matches the reported upstream WebSocket failure and does not appear to be caused by general connectivity or duplicate app instances. I can provide a fully redacted doctor report if maintainers need it.
elhean commentedon Sep 10, 2026
Additional macOS datapoint with cross-network / cross-POP isolation.
I can reproduce the same Remote Control and Responses WebSocket HTTP 503 failure on two separate Apple Silicon Macs:
Both machines initially had unrelated stale/version-skewed app-server state. That was cleaned up and both were aligned to Codex 0.153.4. Afterward:
/usr/bin/truepassesI also deleted the local Remote Control enrollment on one Mac and performed a completely fresh re-enrollment from zero. The new enrollment was successfully created and persisted with Remote Control enabled, but the WebSocket immediately returned the same HTTP 503. This appears to rule out stale enrollment as the cause.
Network isolation
The Remote Control endpoint:
wss://chatgpt.com/backend-api/wham/remote/control/serverreturns:
503 Service Unavailablewith:
upstream connect error or disconnect/reset before headers. reset reason: connection terminationfrom three independent hosts:
All three requests terminate at Cloudflare BEG and include
x-openai-proxy-wasm: v0.1.A normal HTTPS GET to the same endpoint from BEG returns the expected:
HTTP/2 426so HTTPS reachability to the endpoint itself is healthy.
A completely unrelated WebSocket endpoint (
ws.postman-echo.com) successfully returns:101 Switching Protocolsfrom the affected Mac, so WebSockets are not generally blocked by the local network.
Independent control from another POP
I also ran the identical unauthenticated diagnostic from a GitHub-hosted Ubuntu runner:
Results:
HTTP/2 426HTTP/1.1 400 Bad RequestHTTP/1.1 101 Switching ProtocolsImportantly, the LAX request does not reproduce the upstream
503.This adds BEG/macOS evidence to the ATH and GRU reports already present here and suggests the failure is associated with particular Cloudflare → OpenAI WebSocket upstream paths rather than Remote enrollment state, duplicate desktop instances, a single ISP, or general WebSocket connectivity.
The Desktop UI messages observed during the same underlying transport failure were misleading:
Could not enable Remote Control. Check if only one instance is activeCouldn't update remote control availabilitywhile process inspection showed only one actual Desktop instance and the transport logs showed repeated HTTP 503 / reconnect events with zero successful
Connectedevents.dpalis commentedon Sep 10, 2026
Additional macOS datapoint from Brazil (Cloudflare GRU), same failure signature.
Environment
has_enrollment=true)Timeline (from the app-server log db)
HTTP 503 Service Unavailable, bodyupstream connect error or disconnect/reset before headers. reset reason: connection termination,request-id: <none>. Example:cf-ray: a389addf38156ea9-GRUat 22:37 UTC.Isolation
curl --http1.1withUpgrade: websocket) tohttps://chatgpt.com/backend-api/wham/remote/control/serverreturns 503 with the same body, over both IPv4 and IPv6. The same happens for any path under/backend-api/wham/when the Upgrade headers are present./server, 404 on/client), and/backend-api/mereturns 403 as expected. So plain HTTPS reaches the upstream; only websocket upgrades are being reset at the gateway.lazyd3v commentedon Sep 10, 2026
Additional Linux datapoint through Cloudflare CDG, reproducing the same failure signature on 2026-09-10 around 05:53 UTC.
Environment
chatgpt 26.901.512310.153.40.152.1Desktop Remote Control logs
At
2026-09-10T05:53:27Z, the transport logged reconnect attempt 6 withhas_enrollment=truefor:Multiple preceding reconnect attempts show the same error.
Fresh diagnostics and isolation
doctor --jsonusing both the separate CLI0.152.1and desktop-bundled0.153.4. Both report the Responses WebSocket failing with the same HTTP 503/upstream connection termination, while normal HTTP provider reachability passes (HTTP 405) and auth is configured.2026-09-10T05:53:31Z, an unauthenticated ordinary HTTP/1.1 GET to the Remote Control server endpoint returned 426 Upgrade Required, withwebsocket_upgrade_required.a38c2c3979d7c395-CDG.x-openai-proxy-wasm: v0.1and CDG Ray IDs.This adds CDG/Ubuntu evidence to the existing reports. The raw upgrade probe reproduces the 503 independently of CLI version or local enrollment, although it does not establish the underlying cause. Hostname, local paths, and account/enrollment identifiers are omitted.
ktogias commentedon Sep 10, 2026
Update: As of Sep 10 around 13:14 EEST, the issue has recovered for me without any local configuration, authentication, enrollment, or network changes.
Remote Control is working normally again, and the Codex Responses WebSocket errors have also disappeared.
This further suggests a transient upstream/WebSocket infrastructure issue rather than a client-side state problem.
fbajosh commentedon Sep 15, 2026
Ubuntu 24.04, ChatGPT Linux desktop app, failure began around September 14, iOS and macOS controllers both fail to receive new chats, full ChatGPT/app-server restart did not fix it, CLI 0.154.0, local DB integrity OK, and Remote had previously worked.