Desktop app (macOS): logged out after every conversation — "Missing valid access token or actor biscuit", no token refresh attempted

Open 💬 3 comments Opened Aug 24, 2026 by Kaede-cc-V
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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/)

  1. 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
``

  1. Immediately followed by:

``
sa_server_request_failed attachAuth=true attachIntegrityState=true
errorMessage="Missing valid access token or actor biscuit"
``

  1. All subsequent backend-api requests degrade to hadToken=false skipRetryReason=no_token_attached and retry ~1/min indefinitely.
  2. After access-token expiry (~1h), no refresh attempt is ever madeauth.json stays untouched (verified with a file watcher).
  3. On a previous occasion the app also logged Failed to refresh token: 401 ... "Your refresh token has been invalidated" (code token_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; secd logs 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.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39695
  • #39803
  • #40143
  • #40374
  • #40373

Powered by Codex Action

janneman86 · 3 days ago

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:

  • The older tasks and their local transcripts were still intact.
  • The local task database passed its integrity checks.
  • The codex:// handler was registered correctly.
  • The app successfully resumed the task first: thread/resume returned errorCode=null.
  • Immediately afterward, authentication failed with 401 Unauthorized and refresh_token_invalidated.

This suggests the logout was caused by stale or invalid desktop authentication—not corrupted older tasks.

What fixed it for me

  1. Open chatgpt.com in your browser.
  2. Open the profile menu and fully Log out, then confirm.

Be aware that this can also sign you out of other ChatGPT sessions.

  1. Return to the Codex/ChatGPT Mac app.
  2. Click Sign in another way.
  3. Choose Email and sign in directly using the email address connected to your ChatGPT account. Do not use Google, Apple, or another social-login option.
  4. Enter the email verification code if requested.
  5. On the Sign in to Codex with ChatGPT page, explicitly select the workspace containing the affected older tasks. In my case, this was Personal account. My personal and company workspace both use the same email address.
  6. Click Continue/Open ChatGPT, return to the desktop app, and try opening the older tasks again.

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 further refresh_token_invalidated errors 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:

  • macOS 27 beta (26A5421a)
  • ChatGPT/Codex 26.818.61809, build 7019

Btw I also have advanced security on so that shouldn't be the issue

I still observed a separate account-settings 401 saying Must 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.

wrencanfly · 2 days ago
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: The older tasks and their local transcripts were still intact. The local task database passed its integrity checks. The codex:// handler was registered correctly. The app successfully resumed the task first: thread/resume returned errorCode=null. Immediately afterward, authentication failed with 401 Unauthorized and refresh_token_invalidated. This suggests the logout was caused by stale or invalid desktop authentication—not corrupted older tasks. What fixed it for me 1. Open chatgpt.com in your browser. 2. Open the profile menu and fully Log out, then confirm. Be aware that this can also sign you out of other ChatGPT sessions. 3. Return to the Codex/ChatGPT Mac app. 4. Click Sign in another way. 5. Choose Email and sign in directly using the email address connected to your ChatGPT account. Do not use Google, Apple, or another social-login option. 6. Enter the email verification code if requested. 7. On the Sign in to Codex with ChatGPT page, explicitly select the workspace containing the affected older tasks. In my case, this was Personal account. My personal and company workspace both use the same email address. 8. Click Continue/Open ChatGPT, return to the desktop app, and try opening the older tasks again. 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 further refresh_token_invalidated errors 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: macOS 27 beta (26A5421a) * ChatGPT/Codex 26.818.61809, build 7019 Btw I also have advanced security on so that shouldn't be the issue I still observed a separate account-settings 401 saying Must 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!