Windows Codex Desktop remote-control QR pairing remains stuck after stale remote hosts are cleaned up
What issue are you seeing?
After upgrading to Codex Desktop 26.623.31443 (released Jun 26, 2026) with app-server 0.142.2, remote host/project selection got stuck on stale remote-control environments.
I was able to recover the Mac mini remote projects by removing stale remote-control environment records and resetting selected-remote-host-id back to the current Mac mini environment. However, Windows Codex Desktop still cannot be paired/controlled: scanning the QR code stays stuck and the Windows connection never completes.
This is disappointing because this is a core remote-workflow feature. After upgrading to the latest Codex Desktop, I expected remote host selection and pairing to become more reliable, but instead remote projects disappeared, stale hosts won selection, and the Windows pairing flow still cannot recover even after manual cleanup. For a workflow that depends on switching between macOS, a Mac mini, and Windows, the current behavior makes the feature feel fragile and hard to trust.
This also cost a significant amount of time to diagnose and recover. I had to inspect local state files, desktop logs, backend environment responses, stale environment IDs, and manually clean up remote-control records just to get the Mac mini projects back. The Windows flow is still blocked after that, so this is not just a minor UI glitch; it has already caused real debugging overhead and interrupted normal work.
More broadly, Connections/remote-control has repeatedly broken for me after Codex updates. When each update risks breaking remote hosts, hiding projects, or forcing manual state/backend cleanup, it creates a strong disincentive to update Codex at all. I want to stay current, but this pattern makes updates feel risky because the remote workflow may need another round of manual recovery afterward.
This looks related to the existing Windows/mobile remote-control reports, but this case has an additional stale-host selection component:
- Mac mini remote projects were hidden until stale env records were removed.
- After cleanup, Mac mini works again.
- Windows still fails at QR/mobile pairing.
Steps to reproduce
- Use the same ChatGPT account with Codex Desktop on macOS, a remote Mac mini, and a Windows Codex Desktop host.
- Upgrade Codex Desktop to
26.623.31443/ app-server0.142.2. - Have multiple historical remote-control environments for the same account, including stale/offline Windows and old Mac mini entries.
- Open Codex Desktop on macOS and inspect remote projects / Connections.
- Try to re-enable or reconnect the Windows Codex Desktop remote-control setup by scanning the QR code.
- Observe that QR pairing remains stuck and Windows never becomes usable as a remote-control target.
Expected behavior
- Stale/offline remote-control environments should not steal selection from the current online host.
- The remote project selector should show the current Mac mini projects consistently.
- Windows Codex Desktop QR pairing should complete or surface a clear actionable error.
- Codex updates should preserve existing Connections state safely, or provide a supported repair path when migration fails.
Actual behavior
- Before cleanup, Codex selected stale remote-control environments even when a current Mac mini host was online.
- The remote project selector could flash briefly and disappear.
- After deleting stale Windows and old Mac mini environment records, the Mac mini project list recovered.
- Windows Codex Desktop still cannot complete QR pairing; scanning the QR code leaves the setup stuck.
- The issue reinforces a recurring pattern where updating Codex breaks Connections and makes future updates feel unsafe.
Diagnostics
Local state after cleanup only references the current Mac mini host:
{
"selected": "remote-control:env_e_6a0660...",
"added": ["env_e_6a0660..."],
"remoteProjectHosts": ["remote-control:env_e_6a0660..."]
}
Relevant macOS Codex Desktop log pattern before cleanup:
[remote-connections/selection] persisted_selection_reconciled \
persistedSelectedRemoteHostId=remote-control:env_e_6a0660... \
selectedRemoteHostId=remote-control:env_e_6a2cbd...
Request failed method=remoteControl/status/read \
error="Connection for host ID remote-control:env_e_6a2cbd... not found"
After cleanup, the client-specific environment list only returned the current Mac mini env and Mac mini remote projects recovered, but Windows QR pairing still remains stuck.
Related issues that appear similar or adjacent:
- #22733
- #25733
- #25904
- #25532
- #23112
Environment
- Codex Desktop macOS:
26.623.31443 - app-server:
0.142.2 - Current working remote host: Mac mini, app-server
0.142.2 - Failing host: Windows Codex Desktop remote-control QR pairing
- Mobile app: ChatGPT mobile app scanning Codex QR code
Additional notes
The issue may involve two separate problems:
- stale remote-control environments can incorrectly win
selectedRemoteHostIdreconciliation; - Windows Codex Desktop QR pairing remains stuck even after the stale host records are removed and macOS/Mac mini remote control works again.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional Windows reproduction / evidence from another machine.
I am seeing the same stale remote-control host selection behavior on Windows, but with a very clear local-vs-runtime mismatch:
Environment:
OpenAI.Codex_26.623.9142.0_x640.142.4Observed state:
remote_control_enrollmentscontains only the current Windows host:environment_id = env_e_6a19...remote_control_enabled = 1remote-control:env_e_6a23...I closed Codex Desktop completely and repaired both global state files so
selected-remote-host-idpointed to the current Windows host:After relaunching Codex Desktop, the app immediately overwrote the valid persisted selection with the stale Mac host. The Desktop log shows the mismatch directly:
Immediately afterwards, the selected stale host cannot be resolved:
So the local enrollment database is correct, and the manual state repair succeeds while Codex Desktop is closed. The bad state returns only when Desktop reconciles its remote connection list. That list appears to contain only the stale remote host, and Desktop lets it override the valid persisted current host even though the stale host cannot be resolved by the connection manager.
Expected behavior:
Connection for host ID ... not foundshould not winselectedRemoteHostIdreconciliation.Additional Windows datapoint that looks very close to this stale remote-control host selection issue.
Environment:
26.623.13972.0OpenAI.Codex_26.623.13972.0_x64__2p2nqsd0c76g00.142.5Observed state after reinstalling Codex Desktop, revoking mobile access, re-pairing the Android device, and restarting Desktop:
The current mobile pairing works: ChatGPT Android connects to the current Windows PC and I can send messages to an existing Codex thread from mobile.
However, Codex Desktop still persists/selects the old remote-control host ID in
.codex-global-state.jsonafter restart. The old host was associated with a previous Windows machine name, while the current local environment ID is different.User-visible impact:
Local data checks showed the underlying thread/project data was still present:
I tried local state repair while Codex Desktop was fully closed. Setting/resetting the selected host locally did not prevent Desktop from persisting the stale remote-control host again after restart.
I was able to restore the Desktop project list only by rebuilding local project metadata from the local thread catalog into
.codex-global-state.json, including:After that, the Desktop project list is visible again. But the stale selected host still remains:
This seems consistent with the issue described above: a stale remote-control environment can continue to win or remain in Desktop host selection even after the current local host is valid and mobile remote access is working.
Expected behavior:
I used Codex locally to inspect the relevant state files and summarize the diagnostics above.
I can independently reproduce the stale remote-host selection problem on a newer release, and it has materially blocked my development workflow.
Environment
26.727.51351(build6119)0.146.0-alpha.9.2Authoritative state vs. local state
The remote-control backend correctly reported the Windows environment as offline:
However, the macOS controller still persisted the offline environment as its current target:
The desktop logs simultaneously showed all of the following:
Despite the authoritative
online=falsestate and the local manager beingdisconnected, the paired environment remained exposed as an available/current host. Requests continued to route toward the stale host ID, which prevented normal connection and remote project work.Workaround used
I backed up
~/.codex/.codex-global-state.json, removed only:selected-remote-host-idremote-connection-auto-connect-by-host-idI deliberately preserved the device pairing and three cached remote-thread summaries. After restarting the desktop app, the controller could reload without the stale host being forced as the current target.
Expected behavior
When the authoritative environment is offline, or
remoteControl/status/readreturns “Connection for host ID ... not found”, selection reconciliation should:localfor the current/default target;Impact and compensation request
This regression blocked my active development project for a significant amount of time. I had to stop normal engineering work, inspect desktop logs, compare backend presence data with local connection-manager state, identify the stale persisted selector, protect existing remote task history, and manually repair an internal Codex state file. The failure was not caused by my project or Windows application; it was a Codex Desktop state-reconciliation defect.
Because this caused substantial productivity loss and I am providing a current, independently verified reproduction with a narrowly tested workaround, I respectfully request that OpenAI consider appropriate compensation—such as service/account credits, a product bug reward if one applies, or formal researcher acknowledgment. Please contact me privately through my GitHub account if sanitized diagnostics or a feedback session ID would help.
Related: #30329 and #23112.