Skip to content

iOS Remote Control pairing fails at secure setup on two different hosts: revoked iPhone cannot re-enroll, never-revoked iPad also fails (claimed=false) #39959

Closed

Description

Related issues: #37925, #22700, #23339, #23112, #28119

Versions

  • Host 1: Mac mini (Apple Silicon), ChatGPT desktop 26.814.41407 (Build 6720, checked 2026-08-19)
  • Host 2: second ChatGPT desktop host on a laptop (works fine as a desktop controller of Host 1 over the internet)
  • iPhone 16 Plus: latest iOS, ChatGPT iOS 1.2026.223
  • iPad Pro 11" (M5): iPadOS 26.4.2, ChatGPT 1.2026.202 at time of failure
  • Same personal account & workspace on all devices; TOTP (authenticator app) MFA enabled

Cross-device matrix

Controller Host Result
Laptop (desktop app) Mac mini ✅ works, cross-internet
iPhone Mac mini ❌ secure setup error / "pairing failed, scan again"
iPhone Host 2 (laptop) ❌ same failure
iPad (never revoked) Mac mini ❌ "secure setup could not be completed"

Key evidence

Local read-only diagnostics (2026-08-21)

  • ~/.codex/.codex-global-state.json on the Mac mini host was inspected
    read-only after a verified backup:
    • electron-local-remote-control-environment-id =
      env_e_6a0839f0f1748327854244b433e52bd3 and
      electron-local-remote-control-installation-id =
      3ad2f159-a692-47aa-9c16-81bbaede6a34, both matching the live environment.
    • electron-remote-control-client-enrollments is absent, and a recursive
      key scan found no other key containing pairing or enrollment. The only
      other Remote-Control-specific state is
      electron-remote-control-config-migration-completed=true.
  • So the local stale-enrollment workarounds from Codex mobile pairing can get stuck when local global state keeps revoked client/environment IDs #23112 / Codex Desktop remote-control client remains stuck after revocation #28119 do not apply
    here: there is nothing local to clear on the host, and host-side registration
    state appears to have been migrated out of the JSON global state on current
    builds (registrations were previously observed in the app's local SQLite
    store on 2026-08-04).
  • A backend read-only check (clients / environments / mfa_requirement) was
    not performed: no authenticated session was safely reusable and we did
    not extract tokens or re-authenticate. No claim is made about backend state —
    that is exactly what we need OpenAI to check.

Environment IDs (non-credentials)

  • environment env_e_6a0839f0f1748327854244b433e52bd3
  • server srv_e_6a0839f0f1848327858568dcc614468c
  • installation 3ad2f159-a692-47aa-9c16-81bbaede6a34

Asks

  1. Check whether the mobile secure-claim for request c7f876af-… ever reached
    the backend; if it did, what rejected it (auth policy / MFA factor /
    workspace policy / credential validation / stale revoked-device binding).
  2. Check account-side mobile controller enrollments for stale / revoked /
    duplicate state.
  3. Provide (or perform server-side) a reset of the mobile controller
    enrollment only
    , without resetting the account, chats, Codex tasks, or the
    two host environments.

OpenAI support case 12650539 contains full sanitized logs; it has had no
substantive engineering response since 2026-08-05.

Activity

  1. added
    bug
    iOS
    auth
    on Aug 21, 2026
  2. github-actions commented on Aug 21, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. wangxiaobao0726-netizen commented on Aug 21, 2026

    @wangxiaobao0726-netizen
    Author

    Follow-up: additional read-only diagnostics (2026-08-21) — host local DB + device-side observations

    Local SQLite inspection (copy-only, read-only; no state was modified). The host's local app database contains a remote_control_enrollments table (fields: websocket_url, account_id, app_server_client_name, server_id, environment_id, server_name, updated_at, remote_control_enabled) with exactly two live rows:

    app_server_client_name server_id / environment_id updated_at (UTC+7) remote_control_enabled
    Codex Desktop srv_e_6a0839f0f1848327858568dcc614468c / env_e_6a0839f0f1748327854244b433e52bd3 2026-08-19 19:02:12 true
    codex_remote_pairing_diagnostic same server / same environment 2026-08-05 09:33:49 null

    The second row was created within ~1 second of the support-requested repro's pairing/start on 2026-08-05 (09:33:50 +07) and still persists today, sharing the same server_id/environment_id as the live host enrollment, with remote_control_enabled=null. Earlier, on 2026-08-04, a diagnostic connection had received HTTP 409 "Remote app server already online".

    Question for the team: can a stale duplicate app-server enrollment under the same server identity interfere with completing new mobile secure-claims, while leaving an already-established desktop controller session unaffected?

    Note on scope: this table stores host-side app-server enrollments only — it has no mobile client IDs, device types, or revoked/stale flags. The iPad client ID (cli_3573f8827ea64b8c9ecf790a039ef7f7) does not appear in any live TEXT/BLOB field of the DB. Since the host is not expected to store a mobile client list locally, this is not evidence in either direction about backend state.

    Device-side observations (same day). Same account on both devices, opposite visible states, identical functional failure:

    • iPhone (revoked 2026-08-03, since fully reinstalled): the Remote connection list is completely empty; fresh pairing still fails at secure setup.
    • iPad (never revoked): the Mac mini host is still listed, but every connection attempt fails with "secure setup could not be completed".

    This pattern is consistent with a server-side mobile-controller enrollment block (one device blocked from re-enrolling after revocation, the other unable to re-establish an existing enrollment) rather than visible local residue on either device. No local state was modified during any of these checks.

  4. wangxiaobao0726-netizen commented on Aug 21, 2026

    @wangxiaobao0726-netizen
    Author

    Re: duplicate check (#39856) — reviewed; related but not a duplicate. Keeping this issue open because the failure stage differs:

    • In Windows Remote: QR pairing succeeds but Android clients cannot establish session (nextConnectionCount=0) on 26.818.31338 #39856, QR pairing succeeds (the mobile client is created and appears in the host's authorized-device list) and the failure occurs afterward, at session establishment/attach — predominantly Android, with a regression window around 2026-08-19, and at least one A/B report there shows iPadOS connecting fine to an affected host.
    • Here, the mobile secure-claim itself never completes: the pairing session stays claimed=false, no mobile client is ever created (19× client/list OK, nextConnectionCount=0), both iOS devices fail, and onset predates that regression window (it began before the 2026-08-03 revocation).

    They do look like siblings on the same backend path, though: stale server-side registration evidence appears in both threads — HTTP 409 "Remote app server already online" reported in #39856, and the persistent codex_remote_pairing_diagnostic app-server enrollment with remote_control_enabled=null sharing the live host's server_id/environment_id, documented above in this issue.

    Also noteworthy for triage: a commenter in #39856 performed exactly the local host-state reset sometimes suggested for these cases (clearing remote_control_enrollments in the app's SQLite store, rotating installation_id, removing the electron local-remote-control keys) and it did not resolve their mobile failure either — consistent with the blocking state being server-side.

    Asks 1–3 in the issue body stand: please check the secure-claim telemetry for request c7f876af-… and this account's mobile controller enrollment state.

  5. wangxiaobao0726-netizen commented on Sep 4, 2026

    @wangxiaobao0726-netizen
    Author

    Resolved — root cause found. Posting the details for anyone who lands here with the same symptoms.

    Summary. Pairing from my iPhone and iPad was being rejected at the client/pair step because the phone's ChatGPT session had been created via the "trusted device" path (the authenticator step was skipped), while remote control on my account requires an MFA-assured session (GET /backend-api/wham/remote/control/mfa_requirement returns required). Controller enrollment itself had succeeded — the account's clients list showed both the iPhone and the iPad as enrolled_device_key — which is why the app never showed any auth prompt and just failed with "An error occurred while pairing. Please scan the code again." (earlier: "Couldn't finish secure setup").

    How it was confirmed.

    • chatgpt.com → Settings → Security → Active sessions: both mobile sessions were tagged "Trusted device". The Mac session, which could control the same host without problems, was not.
    • I signed the iPhone session out from that page (this also dropped its trusted-device status), reinstalled the app, signed in again completing the authenticator step, and scanned a fresh QR code. It paired on the first try; the phone now appears under "Devices that can control this Mac" and remote control works end to end.

    What did not help (all tried during August): reinstalling the app, restarting the phone, generating new QR codes, changing the host's network, revoking and re-adding the phone, updating every app involved.

    Two suggestions for the team.

    1. When client/pair (or enrollment) is rejected because the session lacks MFA assurance, the mobile app should say so and offer a step-up prompt, instead of a generic "scan again" error. This cost a month of troubleshooting.
    2. A session created through "trusted device" should be able to step up to MFA for remote-control operations.

    If you are seeing the same symptoms, check whether your phone's session shows "Trusted device" under Active sessions. This may explain some of the reports in #22700, #37925, #26535 and #24328.

    Closing this issue from my side since the reported failure is resolved.

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

    authbugiOSremote

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions