Windows Desktop 26.818.5229.0 clears a valid second-account token and enters a 401 restart loop
What version of the Codex App are you using (From “About Codex” dialog)?
26.818.5229.0
What subscription do you have?
/
What platform is your computer?
_No response_
What issue are you seeing?
can reliably reproduce an account-specific authentication loop in ChatGPT/Codex Desktop for Windows.
- Desktop version:
26.818.5229.0 - Windows:
10.0.26200, x64, zh-CN - Old account: Plus; works normally in Desktop
- New account: Pro; Desktop repeatedly closes/restarts
- Codex CLI version:
0.149.0-alpha.4.1
I ruled out local-data corruption and stale cache. All local rollouts were migrated to paginated history, every SQLite integrity check passes, and Reset-AppxPackage completed successfully with the local session/database hashes unchanged.
The new Pro account was then authenticated independently with codex login --device-auth. All three token types were present, and a real Codex CLI request succeeded and returned OK. The access token was not expired.
However, when Desktop starts with this verified Pro credential, it initially recognizes the account and successfully resumes a local thread. Desktop then requests /backend-api/accounts/{account_id}/settings, receives HTTP 401 with Missing valid access token or actor biscuit, and app-server immediately reports:
hasToken=false nullReason=auth_token_missing refreshToken=true tokenExpiryState=missing
Desktop account lookup changes to account_info_token_unavailable, additional /wham/* requests return 401, IPC ends with EPIPE, and the app closes/restarts. Reopening reproduces the same sequence. Switching back to the old Plus account restores stable Desktop operation. The same new Pro credential remains fully functional in Codex CLI and can resume the same old local thread.
This appears to be a Windows Desktop/account-settings authentication regression rather than an account entitlement, network, project, or local-history problem. A failed optional account-settings request should not clear a valid Codex token or terminate the Desktop session.
I have a sanitized detailed report and timestamped logs available. Please let me know which session ID or log subset would be most useful.
What steps can reproduce the bug?
desktop
What is the expected behavior?
_No response_
Additional information
_No response_
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I was affected by the same authentication loop on Windows with ChatGPT/Codex Desktop.
In my case, the problem was resolved by clearing old active Codex sessions from my account.
What I did:
After doing this, the login loop disappeared. I have now been using the new app for several days without the issue returning.
Before this, the logs repeatedly showed:
My assumption is that multiple stale/active Codex sessions may have caused a token/session conflict. I cannot confirm the internal cause, but revoking all existing Codex sessions fixed the problem in my case.
It may be worth trying this as a workaround for other affected users.