Skip to content

Codex mobile Remote Control shows only one macOS host and overwrites it with the last active desktop host #22950

Closed

Description

@ZhenWang-BIT

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?

  1. Use two Macs signed into the same ChatGPT account and workspace.

    • Host A: MacBook Pro
    • Host B: Mac Studio
  2. 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

  3. 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

  4. Quit Codex on Host B.

  5. Start Codex on Host A.

  6. On ChatGPT iOS, log out and log back in if needed, then complete the Remote Control authorization prompt.

  7. Open ChatGPT iOS Codex Connections.

    Observed:

    • The iOS app shows Host A.
  8. Keep Codex running on Host A.

  9. Start Codex on Host B.

  10. Do not scan a new QR code.
    Do not manually re-pair Host B.

  11. 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.
  1. 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

  1. 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.
  1. 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

  1. added
    appIssues related to the Codex desktop app
    on May 16, 2026
  2. added
    bugSomething isn't working
    iOSIssues related to the Codex iOS app
    on May 16, 2026
  3. github-actions commented on May 16, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. ZhenWang-BIT commented on May 19, 2026

    @ZhenWang-BIT
    Author

    Update: resolved locally, root cause appears to be duplicated ~/.codex/installation_id after macOS Migration Assistant

    I 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:

    • ComputerName
    • LocalHostName
    • HostName
    • hostname
    • ~/.codex/state_5.sqlite remote_control_enrollments hash
    • electron-local-remote-control-environment-id

    However, I later found that both hosts had the same Codex installation identity:

    ~/.codex/installation_id hash: identical on Host A and Host B
    electron-local-remote-control-installation-id: identical on Host A and Host B
    

    Host B had been migrated from Host A using macOS Migration Assistant, so it looks like Migration Assistant copied:

    ~/.codex/installation_id
    

    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:

    • ChatGPT iOS showed only one host.
    • When Host A was active, iOS showed Host A.
    • When Host B started Codex, iOS automatically changed the visible host to Host B.
    • When Host B stopped Codex, iOS automatically changed back to Host A.
    • Only one visible host slot appeared to exist for both machines.

    Important diagnostic detail

    Clearing only the remote and mobile keys from:

    ~/.codex/.codex-global-state.json
    

    was not sufficient.

    The keys I cleared were:

    electron-remote-control-client-enrollments
    electron-local-remote-control-environment-id
    electron-local-remote-control-installation-id
    codex-mobile-setup-completed
    codex-mobile-has-connected-device
    

    After clearing those keys, starting Codex immediately restored electron-local-remote-control-installation-id to the old value.

    The reason appears to be that .codex-global-state.json was only mirroring the installation ID. The actual source was:

    ~/.codex/installation_id
    

    Fix that worked

    I fixed the issue by resetting the Codex installation identity only on the migrated Mac, Host B.

    Steps:

    1. Fully quit Codex on both hosts.

    2. Make sure no Codex Desktop, remote-control, app-server, Computer Use, or Codex plugin process was still running.

    3. On Host B only, back up and move aside:

    ~/.codex/installation_id
    
    1. On Host B only, clear the remote and mobile keys in:
    ~/.codex/.codex-global-state.json
    
    1. On Host B only, clear old remote-control enrollment rows from:
    ~/.codex/state_5.sqlite
    
    1. Restart Codex on Host B.

    2. Verify that Host B generated a new ~/.codex/installation_id.

    3. Reconnect Codex Remote Control.

    4. 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:

    ~/.codex/installation_id
    

    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:

    • Detect duplicate installation_id after macOS Migration Assistant or machine migration.
    • Regenerate ~/.codex/installation_id when hardware or local machine identity clearly differs from the original installation.
    • Add a Repair Remote Control or Reset local installation identity action in Codex Desktop.
    • Warn users when multiple active desktop hosts in the same account or workspace report the same installation ID.
    • Do not silently overwrite the visible iOS host when two different machines share the same installation ID.
    • Document that ~/.codex/installation_id is machine-specific and should not be cloned across Macs.
    • Document that clearing .codex-global-state.json alone is not sufficient if ~/.codex/installation_id is still duplicated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingiOSIssues related to the Codex iOS appremote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions