Description
What version of the Codex App are you using?
Codex CLI: 0.158.0
app-server: 0.158.0
Managed Codex: 0.158.0
Codex Desktop app installed on Windows 11.
What subscription do you have?
ChatGPT Plus.
What platform is your computer?
Windows 11 Professional, x64.
Mobile client: Galaxy Tab S9 running the ChatGPT Android app.
What issue are you seeing?
Codex Remote Control cannot establish the host connection on Windows even though the local Codex environment, ChatGPT authentication, normal HTTPS reachability, and the generic Responses WebSocket diagnostic all pass.
The host repeatedly reports:
Error: Remote control is enabled on <HOSTNAME> but the connection is errored.
And:
{
"mode": "daemon",
"status": "connecting",
"serverName": "<HOSTNAME>",
"environmentId": "<redacted>",
"timedOut": true,
"daemon": {
"status": "alreadyRunning",
"backend": "pid",
"cliVersion": "0.158.0",
"appServerVersion": "0.158.0"
}
}The Android pairing flow can progress surprisingly far:
- Generate a manual pairing code with
codex remote-control pair. - Enter the pairing code in ChatGPT Android.
- Android shows the confirmation screen asking whether this mobile device may access the computer's ChatGPT.
- Tap approve.
- The mobile app then returns to the generic ChatGPT login/signup screen instead of completing Remote Control attachment.
This creates a loop: pairing appears accepted on mobile, but the Windows host remains in connection is errored.
Diagnostics already performed
codex doctor --all reports:
- Auth mode: ChatGPT
- Stored ChatGPT tokens: true
- No proxy environment variables
- Responses WebSocket: connected
- Handshake result: HTTP 101 Switching Protocols
- Provider endpoints reachable over HTTP
- app-server daemon: running in persistent mode
- State database integrity: OK
- CLI / managed Codex / app-server versions all 0.158.0
- 0 failures in doctor output
The Remote Control daemon is actually running and its command line is:
codex.exe app-server --remote-control --listen unix:/// --managed-daemon
settings.json contains:
{"remoteControlEnabled": true}Enrollment anomaly found
The local SQLite database initially had two rows in remote_control_enrollments for the same account, environment, host, and Remote Control websocket URL:
- one row with
app_server_client_name = "Codex Desktop"andremote_control_enabled = 1 - one row with an empty client name and
remote_control_enabled = NULL
The database was backed up first, then Remote Control was stopped and only the rows in remote_control_enrollments were removed.
After confirming:
remaining=0
Remote Control was started again.
The exact same error remained:
Error: Remote control is enabled on <HOSTNAME> but the connection is errored.
So stale/duplicate enrollment state was present, but clearing it did not resolve the underlying problem.
Other troubleshooting already performed
- ChatGPT Android app removed and reinstalled
- Same ChatGPT account confirmed on PC and tablet
- Windows and tablet date/time set automatically
codex remote-control stop/startrepeated- Remote Control toggled off/on in desktop UI
- Codex Desktop signed out and signed back in
- Remote daemon process verified and restarted
- Manual pairing-code flow tested
- Duplicate/stale enrollment rows cleared after backup
- Generic WebSocket diagnostics remain healthy
Steps to reproduce
- On Windows 11 with Codex CLI 0.158.0, authenticate with ChatGPT.
- Enable Remote Control in Codex Desktop.
- Run:
codex remote-control start --json
- Observe:
or a prior state of
Error: Remote control is enabled on <HOSTNAME> but the connection is errored.status=connecting,timedOut=true. - Run:
codex remote-control pair - Enter the generated pairing code in ChatGPT Android.
- Approve the mobile device.
- Observe that the mobile app falls back to the login/signup screen and the Windows host remains errored.
Expected behavior
After successful pairing and approval, the Windows app-server should establish the Remote Control transport and the Android app should show the host/session as available.
Actual behavior
Pairing can be approved on mobile, but the host never reaches a connected Remote Control state and remains errored/timed out.
Why this may be useful
This case appears different from a basic network failure because:
- generic WebSocket handshake succeeds with HTTP 101
- HTTP reachability is healthy
- no proxy is configured
- daemon and database integrity are healthy
- enrollment can be created and pairing RPC works
- clearing duplicate enrollment rows does not recover connectivity
This looks like a Windows-specific Remote Control enrollment/relay/auth-state issue or a backend state mismatch after pairing.
Related reports with similar symptoms exist for other platforms, e.g. #31695, #44313, #44316, and the stale-session family in #24024, but this reproduction is Windows + Android on 0.158.0 with generic WebSocket diagnostics passing.
Identifiers such as account ID, server ID, environment ID, and hostname are intentionally redacted.
Activity
github-actions commentedon Sep 29, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
rohkorean-stack commentedon Sep 29, 2026
Potential duplicates reviewed: #48774, #48777, #48555.
This report may be in the same Android Remote authorization defect family, but it also reproduces a host-side Windows Remote Control failure:
status=connecting,timedOut=true, followed byconnection is errored, whilecodex doctor --allreports HTTP 101 WebSocket success.Duplicate local
remote_control_enrollmentswere backed up and cleared, but a fresh enrollment did not recover the host connection.Please advise whether this should be consolidated into one of the referenced issues or retained as a Windows host-side variant.
SpenceSellers commentedon Sep 29, 2026
I have these exact same symptoms on Linux + Android.
On the Linux (pop-os) side:
My system:
codex doctor --allreports no errors and shows the websocket as happily connected.On the android side:
Same exact symptoms of the ticket, I am stuck in a login loop. "Authorize" to connect -> Sign in -> "Authorize" -> Sign in, forever.