Repository navigation
Codex mobile Remote Control shows only one macOS host and overwrites it with the last active desktop host #22950
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.513.31313 (2867)
What subscription do you have?
ChatGPT Pro 20x
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
ChatGPT iOS Codex Remote Control only shows one macOS Codex Desktop host even though two separate Macs are running Codex.
The visible host in the iOS app changes automatically depending on which Mac is active. When only Host A is running Codex, the iOS app shows Host A. When Host B starts Codex, the iOS app automatically changes the visible host from Host A to Host B without scanning a new QR code or manually re-pairing. When Host B is stopped, the iOS app automatically changes back to Host A.
This looks like a last active host wins behavior, or a single visible host slot being overwritten by whichever macOS Codex host is currently active.
Both desktop apps show the same iPhone controller. Also, if I click Revoke access on either Mac, the other Mac immediately loses access as well. This may be intentional if controller authorization is account-level or workspace-level, but host visibility should still be per machine.
The two Macs have different macOS host identities:
- ComputerName differs
- LocalHostName differs
- HostName differs
- hostname differs
The two Macs also have different Codex remote enrollment hashes from ~/.codex/state_5.sqlite.
Additional context:
- Host A is a MacBook Pro.
- Host B is a Mac Studio.
- Host B was migrated from Host A using macOS Migration Assistant.
- Real hostnames are intentionally redacted here.
What steps can reproduce the bug?
-
Use two Macs signed into the same ChatGPT account and workspace.
- Host A: MacBook Pro
- Host B: Mac Studio
-
Confirm the two Macs have different macOS host identities by running the following on both Macs:
scutil --get ComputerName 2>/dev/null
scutil --get LocalHostName 2>/dev/null
scutil --get HostName 2>/dev/null
hostname -
Confirm the two Macs have different Codex remote enrollment hashes by running the following on both Macs:
sqlite3 ~/.codex/state_5.sqlite '.dump remote_control_enrollments' 2>/dev/null | shasum -a 256
-
Quit Codex on Host B.
-
Start Codex on Host A.
-
On ChatGPT iOS, log out and log back in if needed, then complete the Remote Control authorization prompt.
-
Open ChatGPT iOS Codex Connections.
Observed:
- The iOS app shows Host A.
-
Keep Codex running on Host A.
-
Start Codex on Host B.
-
Do not scan a new QR code.
Do not manually re-pair Host B. -
Wait for the iOS app to refresh.
Observed:
- The iOS app automatically changes the visible host from Host A to Host B.
- The iOS app still shows only one host.
- Both macOS Codex apps show the same iPhone controller as connected.
- On Host B, stop Codex and related Codex remote processes:
pkill -x Codex 2>/dev/null || true
pkill -f 'codex.*remote-control' 2>/dev/null || true
pkill -f 'codex.*app-server' 2>/dev/null || true
- Wait for the iOS app to refresh again.
Observed:
- The iOS app automatically changes back from Host B to Host A.
- Again, only one host is visible.
- Additional observation:
- If I click Revoke access on either Host A or Host B, the other host immediately loses access too.
What is the expected behavior?
ChatGPT iOS should show both active macOS Codex Desktop hosts, or provide a clear host switcher that lets me choose which host to control.
Expected:
- Host A and Host B should appear as separate connected hosts.
- Starting Codex on Host B should not silently replace Host A in the iOS host list.
- Stopping Codex on Host B should not be required for Host A to reappear.
- If iPhone controller authorization is intentionally account-level or workspace-level, that is fine, but host registration and host selection should still be per machine.
- If the current mobile Remote Control preview only supports one visible macOS host at a time, the UI or documentation should make that limitation explicit.
The current behavior is risky because the iOS app silently changes the visible host depending on which desktop host is active. Since each host has different local projects, files, credentials, permissions, tools, and environment, the user may think they are controlling one Mac while the active host has silently changed to another Mac.
Additional information
No response
Activity
github-actions commentedon May 16, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
ZhenWang-BIT commentedon May 19, 2026
Update: resolved locally, root cause appears to be duplicated
~/.codex/installation_idafter macOS Migration AssistantI was able to resolve this locally.
Root cause
The issue was not caused by identical macOS hostnames.
Earlier checks showed that Host A and Host B had different:
ComputerNameLocalHostNameHostNamehostname~/.codex/state_5.sqliteremote_control_enrollmentshashelectron-local-remote-control-environment-idHowever, I later found that both hosts had the same Codex installation identity:
Host B had been migrated from Host A using macOS Migration Assistant, so it looks like Migration Assistant copied:
This appears to have caused both physical Macs to share the same Codex installation identity.
Because the installation ID is used by remote enrollments for grouping or deduping, the two physical Macs behaved like one visible remote host in ChatGPT iOS.
This explains the observed behavior:
Important diagnostic detail
Clearing only the remote and mobile keys from:
was not sufficient.
The keys I cleared were:
After clearing those keys, starting Codex immediately restored
electron-local-remote-control-installation-idto the old value.The reason appears to be that
.codex-global-state.jsonwas only mirroring the installation ID. The actual source was:Fix that worked
I fixed the issue by resetting the Codex installation identity only on the migrated Mac, Host B.
Steps:
Fully quit Codex on both hosts.
Make sure no Codex Desktop, remote-control, app-server, Computer Use, or Codex plugin process was still running.
On Host B only, back up and move aside:
Restart Codex on Host B.
Verify that Host B generated a new
~/.codex/installation_id.Reconnect Codex Remote Control.
Start Codex on Host A and verify the iOS host list behavior again.
After this, the issue was resolved. The two Macs no longer behave like the same visible remote host.
Process cleanup detail
A key detail was that I had to fully stop all Codex-related processes before resetting the installation ID.
In my case, Host B still had a Codex Computer Use process created by the iOS remote client. Until that process was stopped, local state could be restored or remain inconsistent.
Final interpretation
The bug was triggered by migrating Host B from Host A.
The migrated machine inherited the same Codex installation identity from:
This caused ChatGPT iOS Remote Control to show only one visible host and switch that visible host depending on which desktop host was active.
The issue is resolved locally after regenerating the installation ID on the migrated Mac.
Suggested product improvements
Codex should probably detect this case automatically.
Possible improvements:
installation_idafter macOS Migration Assistant or machine migration.~/.codex/installation_idwhen hardware or local machine identity clearly differs from the original installation.Repair Remote ControlorReset local installation identityaction in Codex Desktop.~/.codex/installation_idis machine-specific and should not be cloned across Macs..codex-global-state.jsonalone is not sufficient if~/.codex/installation_idis still duplicated.