Desktop app (macOS): logged out after every conversation — "Missing valid access token or actor biscuit", no token refresh attempted
Environment
- macOS 15 (Darwin 25.5.0), Apple Silicon (Mac mini)
- ChatGPT/Codex desktop app build 26.818.21641 (preview channel)
- codex-cli 0.148.0-alpha.21 (same machine, same account)
- ChatGPT Plus subscription, ChatGPT-account OAuth login
- Network note: system HTTP(S) proxy in use; the codex CLI on the same machine/network works flawlessly for days with zero logouts (relevant control group)
Symptom
The desktop app logs me out after almost every conversation. Finishing a chat, or clicking any history conversation, kicks me back to the sign-in screen. Re-login succeeds but the cycle repeats. ~100% reproducible.
Key log evidence (from ~/Library/Logs/com.openai.codex/)
- Seconds after a model response completes:
````
desktop_fetch_auth_401 hadToken=true skipRetryReason=null
target="GET https://chatgpt.com/backend-api/accounts/:param/settings" tokenSource=cached willRetry=true
- Immediately followed by:
````
sa_server_request_failed attachAuth=true attachIntegrityState=true
errorMessage="Missing valid access token or actor biscuit"
- All subsequent backend-api requests degrade to
hadToken=false skipRetryReason=no_token_attachedand retry ~1/min indefinitely. - After access-token expiry (~1h), no refresh attempt is ever made —
auth.jsonstays untouched (verified with a file watcher). - On a previous occasion the app also logged
Failed to refresh token: 401 ... "Your refresh token has been invalidated"(codetoken_revoked) during a concurrent re-login — but the current failures occur with a fresh, exclusive token.
Already ruled out
- Full data reset: quit app; archived
~/Library/Application Support/Codex,~/Library/HTTPStorages/com.openai.codex*(incl. binarycookies),~/Library/Caches/com.openai.codex, the notifications Group Container, and Preferences; fresh start + fresh device login → same 401 within minutes of the first conversation. - Keychain: login keychain is writable (other Chromium-based apps maintain their "Safe Storage" entries fine), but this app never creates one;
secdlogs show zero denials — the app simply never writes. - Token conflicts: ensured no other process shares the app's
auth.json; the failure reproduces with an exclusive, freshly-issued token. - Reinstall-equivalent (clean profile) does not help; app reports it is up to date.
Question
What causes actor-biscuit issuance/validation to fail persistently for this device? Is it tied to device registration or network/TLS fingerprint (proxy)? The CLI's auth on the same account/machine/network is rock-solid, so this appears specific to the desktop app's web-session path. Happy to provide full logs privately.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Workaround that fixed the older-task logout loop for me
I had the same issue: new tasks worked, but opening an older
codex://threads/...task immediately logged me out.What I verified
I reproduced and investigated this across four different older tasks:
codex://handler was registered correctly.thread/resumereturnederrorCode=null.401 Unauthorizedandrefresh_token_invalidated.This suggests the logout was caused by stale or invalid desktop authentication—not corrupted older tasks.
What fixed it for me
chatgpt.comin your browser.Be aware that this can also sign you out of other ChatGPT sessions.
After the full browser logout and direct email sign-in, I successfully opened all four older tasks without being logged out. The task resumes continued to return
errorCode=null, with no furtherrefresh_token_invalidatederrors while opening them.The successful test happened on the same ChatGPT/Codex build that had previously failed. I had staged a reinstall, but the logs confirmed the app was still running from the older copy, so I do not consider reinstalling or renaming the app to be the fix.
I did not delete
~/.codex, its session files, or its SQLite databases. Those contained healthy local task history, and deleting them could cause data loss.Environment:
26A5421a)26.818.61809, build7019Btw I also have advanced security on so that shouldn't be the issue
I still observed a separate account-settings
401sayingMust use workspace account for this operation, but it no longer logged me out or prevented older tasks from opening. Therefore, this should be considered a workaround rather than a confirmed root-cause fix.log out the web chatgpt and relogin definitely solved my problem! Thanks!