codex - 💡(How to fix) Fix macOS Codex 26.422.21637: OAuth/ChatGPT auth triggers AppRoutes re-mount loop (regression of #12754) [6 comments, 4 participants]

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…
GitHub stats
openai/codex#19264Fetched 2026-04-24 10:39:48
View on GitHub
Comments
6
Participants
4
Timeline
12
Reactions
0
Author
Timeline (top)
commented ×6labeled ×3cross-referenced ×1mentioned ×1

Error Message

  • No explicit error/exception logged — it's a silent render cycle, not an error-boundary crash.

Root Cause

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

Code Example

[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 ...
RAW_BUFFERClick to expand / collapse

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

extent analysis

TL;DR

The issue can likely be fixed by rolling back to a previous version of the Codex App, such as 260204.1342, which is known to work with the same auth.json configuration.

Guidance

  • The problem seems to be related to the size of the auth.json file, specifically when it contains a large OAuth JWT payload, which causes the app to enter an infinite renderer re-mount loop.
  • To verify this, try switching between the API key and OAuth JWT auth.json configurations and observe the difference in behavior.
  • The fact that the CLI (codex) works with the same OAuth auth.json suggests that the issue is specific to the Electron renderer / React layer.
  • Rolling back to a previous version of the Codex App, such as 260204.1342, may be a viable workaround until the issue is fixed in a future version.

Notes

The issue appears to be a regression of a previously fixed bug (#12754), and the exact cause is still unknown. Further investigation and debugging may be necessary to determine the root cause and develop a permanent fix.

Recommendation

Apply workaround: Roll back to Codex.app version 260204.1342, as it is known to work with the same auth.json configuration and does not exhibit the infinite renderer re-mount loop issue.

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