Codex Desktop login hangs after successful Codex CLI browser login with Google federated account
What version of the Codex App are you using (From “About Codex” dialog)?
26.616.71553
What subscription do you have?
Plus
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
Summary
Codex Desktop for macOS Apple Silicon got stuck during browser-based login immediately after I successfully logged into Codex CLI using the same Google-federated ChatGPT account in Chrome.
The CLI login completed successfully, but the Desktop app repeatedly opened a browser login flow and never completed authentication. After force-quitting and reopening Codex Desktop, login worked normally.
This may indicate an issue with the Desktop app's auth callback handling, local listener state, or federated session handling when Codex CLI has just completed a browser-based login.
Environment
- Date observed: 2026-06-23
- OS: macOS on Apple Silicon
- Product surfaces involved:
- Codex CLI
- Codex Desktop for macOS Apple Silicon
- Codex CLI version: [fill in]
- Codex Desktop version: [fill in]
- Browser: Google Chrome
- Auth method: ChatGPT account federated with Google
- Browser state: already logged into the Google account before starting the Codex login flow
- Plan type: Plus
What steps can reproduce the bug?
- Install Codex CLI from a terminal.
- Install Codex Desktop for macOS Apple Silicon.
- Start a Codex CLI session from the terminal.
- When prompted by Codex CLI, choose browser-based login.
- Chrome opens.
- Log in using a Google-federated ChatGPT account that is already authenticated in Chrome.
- Confirm that Codex CLI completes login successfully.
- Open Codex Desktop.
- Codex Desktop asks for login and opens a browser window/tab.
- The browser login flow appears to reach a localhost success callback.
- Codex Desktop never completes login and remains loading.
- Repeat the Desktop login attempt.
- The same behavior occurs again.
- Force quit Codex Desktop.
- Reopen Codex Desktop.
- Try login again.
What is the expected behavior?
Codex Desktop should complete login successfully after the browser callback.
Alternatively, if the Desktop app cannot consume the callback or reuse the existing authenticated browser session, it should show a clear recoverable error instead of remaining stuck in a loading state.
Actual behavior
Codex CLI logs in successfully, but Codex Desktop gets stuck during its browser-based login flow.
The browser appears to reach a localhost success callback, but the Desktop app does not finish authentication. The issue only resolves after force-quitting and reopening Codex Desktop.
Additional information
Callback URL observed
A localhost callback URL was present in browser history. Redacted form:
I am intentionally not including the full id_token because it contains sensitive account/session claims.
Workaround
Force quit Codex Desktop, reopen it, and start the login flow again. After relaunching the app, login completed successfully.
Impact
This can break the first-run login experience for users who install/use Codex CLI and Codex Desktop close together, especially with Google-federated ChatGPT accounts.
A user can get stuck in a repeated login/loading loop with no visible recovery path other than force-quitting and reopening the Desktop app.
Analysis / hypothesis
This may be related to one of the following:
- Codex Desktop local callback listener state not being ready or becoming stale.
- A conflict between a recently completed Codex CLI browser login and the Desktop app login flow.
- Federated Google/SSO session handling.
- Codex Desktop not consuming the localhost callback successfully.
- First-run auth initialization state requiring an app restart.
Additional notes
The issue occurred immediately after both Codex CLI and Codex Desktop had just been installed/downloaded and both login flows were attempted close together.
No code contribution is being proposed here. I am opening this issue to provide reproduction details and a possible root-cause hypothesis, as requested in the contribution guidance.