Windows Desktop 26.818.5229.0 clears a valid second-account token and enters a 401 restart loop
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Windows Desktop startup and account-settings request at /backend-api/accounts/{account_id}/settings, then trace the app-server logs showing auth_token_missing and the resulting restart. Compare the Desktop token flow with the successful codex login --device-auth CLI flow. Done means a failed optional settings request no longer clears a valid token or causes the Desktop session to close and restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, authentication, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100