macOS Codex 26.422.21637: OAuth/ChatGPT auth triggers AppRoutes re-mount loop (regression of #12754)

Open 💬 6 comments Opened Apr 24, 2026 by jiamo
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

Version 26.422.21637 (2056)

What subscription do you have?

Pro (ChatGPT)

What platform is your computer?

Darwin 23.6.0 (macOS 14.7.8), arm64

What issue are you seeing?

When auth.json is an OAuth/ChatGPT-signed-in token (~4.5 KB JWT payload), launching Codex.app immediately enters an infinite renderer re-mount loop. The window either flashes, stays blank, or shows a persistent loading state; UI is unusable.

Distinctive symptom from the launcher log (/Applications/Codex.app/Contents/MacOS/Codex):

  • 141 app routes mounted events in 15 seconds (normal: 1–2)
  • 121 experimentalFeature/enablement/set calls in the same window
  • Pattern repeats every ~150–300 ms:

``
[electron-message-handler] [startup][renderer] app routes mounted after XXXXms
[electron-message-handler] Handled 'ready' message, sent ide-context-updated
[AppServerConnection] method=experimentalFeature/enablement/set (x~13)
[AppServerConnection] method=account/read
[AppServerConnection] method=experimentalFeature/list
→ next mount ...
``

  • No explicit error/exception logged — it's a silent render cycle, not an error-boundary crash.
  • Same webContentsId=1, so the renderer isn't dying/respawning; React is remounting the full route tree.

Looks like a regression of #12754 (Maximum call stack size exceeded in AppRoutes), which was fixed in 26.226.940 but appears to have come back (or a related family) in 26.422.21637.

What steps can reproduce the bug?

  1. Install Codex.app 26.422.21637.
  2. Launch and sign in via ChatGPT. ~/.codex/auth.json is rewritten from ~215 B (API key shape) to ~4.5 KB (OAuth JWT shape).
  3. Quit and relaunch the app (or observe state immediately after sign-in).
  4. UI is unusable; renderer in re-mount loop.

Confirmed by flipping only auth.json:

| auth.json content | app routes mounted in 15 s |
| --- | --- |
| API key ({"OPENAI_API_KEY": "..."}, 215 B) | 2 (normal) |
| OAuth JWT (~4.5 KB, post-ChatGPT-login) | 141 |

All other profile state identical. CLI (codex) works with the same OAuth auth.json, so app-server parses it fine; the loop is purely in the Electron renderer / React layer.

Reproduced with both the default CODEX_HOME=~/.codex and a custom CODEX_HOME=~/.codex-foo.

What is the expected behavior?

App launches and is usable when signed in via ChatGPT.

Additional information

  • codex login status reports "Logged in using ChatGPT" → auth is valid at the CLI / app-server layer.
  • Rolling back to Codex.app 260204.1342 (the version installed prior to 26.422.21637) restores normal behavior with the same auth.json.
  • Log snippet (first ~120 lines showing the loop ramp-up) available on request; redacted it locally because it contains workspace paths and SSH host aliases.

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 2 months ago

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

  • #19220
  • #19075

Powered by Codex Action

jiamo · 2 months ago

No, it is my personal pro account.

jiamo · 2 months ago

Pulled more data from a 15-second launch capture. Tagging @HeMuling since this may overlap with #19075's timeline (their Windows hang also showed app/list failures).

Method-call distribution in a 15-second window (renderer in loop):

| method | count | notes |
|---|---|---|
| experimentalFeature/enablement/set | 121 | ~13 calls per renderer mount, fired repeatedly |
| account/read | 66 | once per re-mount |
| experimentalFeature/list | 38 | |
| config/read | 6 | |
| thread/read | 4 | (pinned threads, only loaded once) |
| thread/list | 1 | only during first mount |
| model/list | 1 | only during first mount |
| configRequirements/read | 1 | only during first mount |
| collaborationMode/list | 1 | only during first mount |
| app/list | 1, durationMs=5046 | every other call is <100 ms |

The app/list call stands out — it takes 5 seconds where everything else is sub-100 ms. Ordinary init calls (thread/list, model/list, configRequirements/read, collaborationMode/list) fire exactly once, while experimentalFeature/enablement/set and account/read loop forever.

First renderer mount is normal (T+2948 ms), the loop starts at the second mount (T+3213 ms):

[renderer] app routes mounted after 2948ms          ← first mount
experimentalFeature/enablement/set × 13              ← writes feature flags
[renderer] app routes mounted after 3213ms          ← re-mount (loop starts)
[renderer] app routes mounted after 3269ms
[renderer] app routes mounted after 3341ms
[renderer] app routes mounted after 3395ms
[renderer] app routes mounted after 3448ms
[renderer] app routes mounted after 3518ms
[renderer] app routes mounted after 3599ms
... continues every ~50–80 ms for the whole 15 s window

Same webContentsId=1 throughout — React is repeatedly remounting the route tree inside a live renderer (not a process respawn).

Hypothesis: something inside the renderer's handling of the initial experimentalFeature/enablement/set batch (or the app/list response that arrives ~5 s in) triggers a state change that React reacts to by re-mounting <AppRoutes>; on re-mount the same side-effect fires, infinite loop.

Account is an individual Personal ChatGPT Plus — no team/business workspace, so #19075's "deactivated workspace" doesn't apply here, but app/list taking 5 seconds on this single-workspace account suggests it may still be where the renderer gets wedged.

Workaround still stands: API-key auth.json (~215 B) → 2 mounts, no loop. Any OAuth JWT → 141 mounts.

entif-ai · 2 months ago

Same here. No reference to "workspace_dependencies" in the config.toml; just totally bricked as of today.

However, I updated the CLI (had to rm the Brew cask manually), logged out and then back in. All good now.

HeMuling · 2 months ago

Thanks for the tag. Small clarification: my related issue is #18556, not #19075.

I think #18556 is adjacent at the startup-state reconciliation level, but probably not the same direct failure mode as this issue. In #18556, the app restored a stale discovered SSH host/project state and then tried to route requests to a hostId that no longer had an AppServerManager. The key error was No AppServerManager registered for hostId: remote-ssh-discovered:....

This issue looks more auth/app-list/feature-enablement related, especially given the OAuth auth.json flip and the repeated AppRoutes remount loop. So I would treat #18556 as the same broad class of “invalid persisted state bricks startup,” but not as a duplicate unless logs show a stale remote hostId involved.

#18974 looks much closer to #18556.

jiamo · 2 months ago

I don't think they test much before release!

My other Mac happened too. I try to upgrade mac os to 26.4, no help here.