macOS Remote Control pairs successfully but host stays Offline — WebSocket handshake HTTP 503 (CLI 0.153.4)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.903.61454
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Darwin 25.3.0 arm64 arm
What issue are you seeing?
Codex Remote Control on macOS pairs successfully with the ChatGPT iPhone app, but the Mac remains Offline and the Remote Control connection stays in an errored state.
Environment:
- Codex App: 26.903.61454
- Codex CLI: 0.153.4
- app-server: 0.153.4
- macOS 26.3.1
- Apple Silicon / aarch64
- ChatGPT Plus
- Authentication: ChatGPT
When I enable Remote Control in the Codex Mac app, the app reports that it was unable to enable Remote Control.
From the CLI:
codex remote-control start
returns:
Starting app-server daemon with remote control enabled...
Error: Remote control is enabled on MacBook-Pro-Piotr.local but the connection is errored.
The same happens with:
codex remote-control --json
However, pairing works. After restarting the daemon and running:
codex remote-control pair
Codex successfully generates a pairing code. I can enter that code in the ChatGPT iPhone app and the Mac is successfully added. The iPhone app recognizes the host as:
MacBook-Pro-Piotr.local
macos/aarch64
app-server 0.153.4
but its status remains "Offline".
The most important diagnostic result is from codex doctor:
Responses WebSocket failed; HTTPS fallback may still work.
handshake transport error:
http 503 Service Unavailable:
Some("upstream connect error or disconnect/reset before headers. reset reason: connection termination")
The WebSocket endpoint is:
wss://chatgpt.com/backend-api/
Normal HTTPS connectivity works:
- ChatGPT inference endpoint reachable (HTTP 405)
- Desktop assets CDN reachable (HTTP 200)
- no proxy environment variables
- system proxy: direct
- managed proxy: not configured
I also tested using a completely different Internet connection (mobile hotspot) and get exactly the same WebSocket HTTP 503 error.
Troubleshooting already performed:
- Logged out and back into the Codex/ChatGPT app
- Restarted the app-server daemon
- Tested two independent Internet connections
- Confirmed no proxy is configured
- Confirmed normal HTTPS connectivity to chatgpt.com
- Confirmed Codex installation/state databases are healthy
- Successfully generated a Remote Control pairing code
- Successfully paired the Mac with the iPhone
~/.codex/app-server-daemon/settings.json contains:
{
"remoteControlEnabled": true
}
So pairing/enrollment appears to work, and the mobile app knows the Mac and its app-server version, but the host cannot establish/maintain the Remote Control connection and remains Offline.
This appears different from #41549: in that report the Remote Control status is errored despite a successful WebSocket HTTP 101 connection. In my case, codex doctor confirms that the WebSocket handshake itself actually fails with HTTP 503 / "connection termination".
What steps can reproduce the bug?
-
Open the Codex desktop app on macOS.
-
Go to Settings → Connections → Remote Control / Control this Mac.
-
Try to enable Remote Control.
The app reports that Remote Control could not be enabled. -
In Terminal, run:
codex remote-control start
Result:
Starting app-server daemon with remote control enabled...
Error: Remote control is enabled on MacBook-Pro-Piotr.local but the connection is errored. -
Run:
codex app-server daemon restart
sleep 5
codex remote-control pair -
A pairing code is generated successfully.
-
Enter the pairing code in the ChatGPT iPhone app.
-
The Mac is added successfully and appears in the iPhone app as:
MacBook-Pro-Piotr.local
macos/aarch64
app-server 0.153.4but the host status remains "Offline".
-
Back on the Mac, run:
codex remote-control --json
Result:
Error: Remote control is enabled on MacBook-Pro-Piotr.local but the connection is errored.
-
Run:
codex doctor
The WebSocket diagnostic consistently reports:
Responses WebSocket failed; HTTPS fallback may still work.
handshake transport error
http 503 Service Unavailable:
Some("upstream connect error or disconnect/reset before headers. reset reason: connection termination")
-
Repeat the same test on a different Internet connection, for example a mobile hotspot.
-
The same HTTP 503 WebSocket handshake error occurs and the paired Mac remains Offline.
What is the expected behavior?
After enabling and pairing Remote Control, the Mac should establish a persistent Remote Control connection to the Codex/OpenAI backend.
The paired Mac should appear as Online in the ChatGPT iPhone app, and Remote Control should be usable without reporting a connection error.
codex remote-control --json should return a healthy/connected Remote Control status instead of:
Error: Remote control is enabled on MacBook-Pro-Piotr.local but the connection is errored.
The WebSocket handshake used by Codex should also complete successfully instead of returning HTTP 503.
Additional information
Additional diagnostics:
- Codex App: 26.903.61454
- Codex CLI: 0.153.4
- app-server: 0.153.4
- macOS: 26.3.1
- Architecture: Apple Silicon / aarch64
- ChatGPT Plus
- Authentication mode: ChatGPT
codex doctor reports the installation, authentication, local databases, desktop app-server, and HTTP reachability as healthy. The only connectivity warning is the Responses WebSocket failure.
No proxy environment variables are configured, the macOS system proxy is direct, and no supported endpoint protection software was detected.
The issue reproduces on two independent network connections, including a mobile hotspot.
Importantly, Remote Control pairing itself succeeds. The ChatGPT iPhone app recognizes the paired Mac, including its app-server version (0.153.4), but shows the Mac as Offline. This suggests that pairing/enrollment succeeds but the persistent connection from the Mac fails afterward.
The relevant codex doctor error is:
handshake transport error
http 503 Service Unavailable:
Some("upstream connect error or disconnect/reset before headers. reset reason: connection termination")
Normal HTTPS connectivity to ChatGPT works at the same time.
I can provide the full redacted output of codex doctor if needed.
I can also attach a screenshot from the ChatGPT iPhone app showing the successfully paired Mac in the Offline state.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is identified. Start with the entry points exercised by codex remote-control start, codex remote-control --json, and codex doctor, then trace the app-server WebSocket handshake path. Done means the handshake succeeds, the remote-control status is connected, and the paired Mac appears Online.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100