Desktop (macOS): session refresh token revoked server-side seconds after sign-in when resuming a thread on gpt-daybreak-blue-latest — repeated forced-logout loop
Open 💬 2 comments Opened Aug 21, 2026 by Sameedahmad
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Summary
Codex Desktop (macOS) enters a repeated forced-logout loop: every fresh sign-in has its refresh token revoked server-side within seconds-to-minutes, reproducibly tied to resuming a thread that uses the gpt-daybreak-blue-latest model (the account has the corresponding access approval). Related to the symptom families in #25443 and #31459, but with a clear reproducible trigger and timeline.
Environment
- macOS 15.x (Darwin 25.5.0), Apple Silicon
- Codex Desktop client 26.818.31338 (runtime bundle 26.819.11345), codex app-server 0.149.0
- Auth mode: ChatGPT sign-in
- Single machine, single install; system clock verified against NTP (offset +0.11s)
Repro / timeline (all times UTC, from app-server logs)
- Sign in fresh → token issued, works.
- App auto-resumes the last thread. If that thread uses
gpt-daybreak-blue-latest, the next/responsescall coincides with the whole token family being revoked:
07:45:27 thread/resume (thread using gpt-daybreak-blue-latest) → POST /responses
07:45:28 ERROR Failed to refresh token: 401 Unauthorized:
{"error":{"message":"Your refresh token has been invalidated. Please try signing in again.",
"type":"invalid_request_error","code":"refresh_token_invalidated"}}
- Electron layer then reports
auth_status_result hasToken=false nullReason=auth_token_missing tokenExpiryState=missingand every subsequent backend-api call 401s (token_invalidated,token_revokedvariants). - User is logged out. Signing in again repeats the cycle (~10 consecutive sessions in one hour on Aug 21; the ChatGPT security page fills with a new dead "Codex" session every ~2 minutes).
Sessions using standard models (gpt-5.6-sol/terra/luna) are unaffected.
Ruled out client-side
- Deleted
~/.codex/auth.json(recreated cleanly on sign-in) - Wiped
~/Library/Application Support/com.openai.codex(Electron token store / Codex Safe Storage) - Logged out all sessions from the ChatGPT security page
- Updated the app; no second OpenAI app installed; no Codex CLI usage
- Deleted the stale
remote_control_enrollmentsrow instate_5.sqlite(the app re-enrolls automatically ~3s after sign-in, so this cannot be cleared by the user either — arguably its own bug: while the stale enrollment existed, the client replayed its revoked token against/backend-api/wham/remote/control/server/refreshon every reconnect attempt)
Expected behavior
- If a model request is not authorized for the account, return a scoped error for that request — not a server-side revocation of the session's entire refresh-token family.
- The desktop app should surface why the session ended instead of silently looping to the login screen.
- Remote-control enrollment should stop replaying a token the server has already reported as revoked (it retries indefinitely with backoff, which looks like refresh-token reuse and may itself trigger family revocation).
Happy to provide full sanitized logs (logs_2.sqlite extracts, Electron desktop logs) on request.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Having exactly same issue after enabling advanced security as required by OpenAI by Sep 1st in order to stay compliant to retain access to "DayBreak Blue".
But as soon as advanced security is enabled, my MacOS codex desktop app (latest as of 8/24/2026) ended up in repeated authentication loop as soon as I click on an existing codex thread, note that authentication flow can complete normally in the advanced security flow using security key, the issue only surfaces when I try to click on a codex session.
Issue persists after clean reinstall which suggests the issue at openAI server end.
also, As soon as I disable advanced security, this issue is gone...
OpenAi pls fix this issue asap before Sep 1st, so that we can stay compliant as you requested, otherwise if I enable advanced security, my desktop codex turns un-usable because of the endless login loop.
Thanks.