codex - 💡(How to fix) Fix Codex mobile remote control stuck Waiting for desktop; desktop has missing account_id and environmentId null

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

~/.local/bin/codex remote-control stop
~/.local/bin/codex logout
~/.local/bin/codex login --device-auth

---

jq -r '.tokens.account_id // "MISSING_ACCOUNT_ID"' ~/.codex/auth.json

---

MISSING_ACCOUNT_ID

---

sqlite3 ~/.codex/state_5.sqlite 'select count(*) from remote_control_enrollments;'

---

0

---

~/.local/bin/codex remote-control start --json

---

{
  "mode": "daemon",
  "status": "connecting",
  "serverName": "Marks-Mac-Studio.local",
  "environmentId": null,
  "timedOut": true,
  "daemon": {
    "status": "alreadyRunning",
    "managedCodexVersion": "0.135.0",
    "cliVersion": "0.135.0",
    "appServerVersion": "0.135.0"
  }
}
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.519.81530

What subscription do you have?

ChatGPT account with Codex enabled; exact plan/workspace type unknown

What platform is your computer?

Darwin 25.3.0 arm64 arm

What issue are you seeing?

Codex mobile remote control never finishes pairing. On iPhone, after scanning the QR code, the ChatGPT app opens and shows "Waiting for desktop" indefinitely. On the Mac, codex remote-control start --json reports the daemon running but stuck in connecting, with environmentId:null.

This still happens after:

  • Reinstalling the Codex desktop app on macOS.
  • Reinstalling the iPhone ChatGPT app.
  • Logging out and back in with codex login --device-auth.
  • Enabling authenticator app/TOTP MFA.
  • Confirming no obvious macOS proxy is configured.

Local evidence suggests the desktop never receives or persists a ChatGPT account id, so remote-control enrollment cannot complete.

What steps can reproduce the bug?

  1. On macOS, install/run Codex desktop app.
  2. Install standalone Codex CLI 0.135.0.
  3. Log out and log back in via device auth:
~/.local/bin/codex remote-control stop
~/.local/bin/codex logout
~/.local/bin/codex login --device-auth
  1. Check the persisted auth account id:
jq -r '.tokens.account_id // "MISSING_ACCOUNT_ID"' ~/.codex/auth.json

Actual output:

MISSING_ACCOUNT_ID
  1. Check remote-control enrollment count:
sqlite3 ~/.codex/state_5.sqlite 'select count(*) from remote_control_enrollments;'

Actual output:

0
  1. Start remote control:
~/.local/bin/codex remote-control start --json

Actual output, redacted to non-sensitive fields:

{
  "mode": "daemon",
  "status": "connecting",
  "serverName": "Marks-Mac-Studio.local",
  "environmentId": null,
  "timedOut": true,
  "daemon": {
    "status": "alreadyRunning",
    "managedCodexVersion": "0.135.0",
    "cliVersion": "0.135.0",
    "appServerVersion": "0.135.0"
  }
}
  1. Scan the Codex remote-control QR code from iPhone. The iPhone ChatGPT app opens, but remains on "Waiting for desktop" indefinitely.

What is the expected behavior?

The desktop should complete remote-control enrollment, persist a valid ChatGPT account id, create a remote-control enrollment, receive a non-null environmentId, and the iPhone app should connect instead of staying on "Waiting for desktop".

Additional information

Additional local details:

  • Codex desktop app version: 26.519.81530
  • Standalone Codex CLI: 0.135.0
  • macOS platform: Darwin 25.3.0 arm64 arm
  • MFA is enabled with authenticator app/TOTP.
  • Normal Codex auth succeeds, but tokens.account_id remains missing after a fresh device-auth login.
  • The remote_control_enrollments table remains empty.
  • This appears similar to other remote-control reports where the desktop stays offline or enrollment never completes.

I have not included auth.json, tokens, email, device codes, or account identifiers in this report.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex mobile remote control stuck Waiting for desktop; desktop has missing account_id and environmentId null