You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After enrolling into Advanced Account Security (to keep access to Daybreak Blue), codex app is stuck in login-logout loop #40611
What I had to do was buy a VPN, clear my cache, restart my PC, and then go into Incognito mode and use the exact same login method (Apple) to login.
For some reason that worked and I have no idea why. IDK if that'll work for you and I'd try the without a VPN purchase but maybe try restarting your router? I'm not too sure what exactly allowed it to work.
Had this exact same issue. The fix was just to re-authenticate via an incognito browser as well. Would say the VPN is overkill. Thanks @danielchristiancazares, this was driving me nuts. @pkqs90 worth a try.
Had this exact same issue. The fix was just to re-authenticate via an incognito browser as well. Would say the VPN is overkill. Thanks @danielchristiancazares, this was driving me nuts. @pkqs90 worth a try.
I can reproduce this on a newer ChatGPT/Codex desktop build, and the failure is blocking access to all existing Codex conversations.
Environment
ChatGPT desktop app: 26.820.60940
Platform: macOS
Browser used for desktop OAuth handoff: Chrome 151
Subscription: ChatGPT Pro
Account: TAC / Daybreak Blue access
Advanced Account Security: enabled in response to the OpenAI security requirement
Hardware authenticators: 2 × Yubico Security Key C NFC (FIDO2/WebAuthn), both registered successfully
What happens
Hardware-key authentication itself succeeds. The browser reports a successful login, OpenAI sends a “New sign-in” notification for App: Codex, and a fresh Codex session appears under ChatGPT → Settings → Security and Login → Active Sessions.
The desktop app then opens normally and shows my projects/conversation list. A fresh/new-chat surface can remain open. However, the moment I open any existing Codex conversation, the conversation starts to load briefly and the desktop app immediately switches back to “Sign in to ChatGPT”.
I reproduced this with multiple unrelated existing conversations, including conversations in different project contexts, so it is not isolated to one thread/project.
Clean reproduction performed
Enabled Advanced Account Security and registered two physical FIDO keys.
Verified both hardware keys independently can authenticate successfully in the web flow.
Quit ChatGPT desktop completely and rebooted macOS.
In ChatGPT Web, removed every old ChatGPT/Codex session individually, leaving only the current known-good web session.
Launched ChatGPT.app and selected Continue to sign in.
Completed the browser authentication using the Yubico hardware key (PIN + physical touch).
Browser reported successful authentication and handed control back to ChatGPT.app. Because “always allow chatgpt.com to open this app” had already been enabled, the final app handoff happened automatically.
Confirmed a new Codex session was created server-side in Active Sessions.
Left the desktop app idle: it remained open and appeared authenticated.
Opened an existing Codex conversation.
The conversation began loading, then the app immediately returned to the sign-in screen.
Repeated with a different existing conversation outside that project: same result.
This was also reproduced in an earlier clean login attempt; each successful browser/FIDO login created a new Codex session, but opening an existing conversation still caused the desktop UI to lose authentication.
Expected behavior
After a successful Advanced Account Security / FIDO authentication, the desktop app should keep the authenticated Codex session and allow existing conversations to open normally.
Actual behavior
Successful FIDO login → fresh server-side Codex session created → desktop appears authenticated → opening any existing Codex conversation → immediate return to sign-in screen.
Troubleshooting already completed
Full macOS restart
Verified both primary and backup Yubico keys independently
Confirmed both keys are registered in ChatGPT security settings
Removed all stale ChatGPT/Codex sessions and reproduced from a clean server-side session state
Repeated browser → app authentication several times
Confirmed web ChatGPT remains usable
Confirmed the failure is not specific to one conversation/project
No separate legacy Codex.app is installed/running; the current unified ChatGPT.app is being used
Impact
Productivity-blocking. I use existing Codex desktop sessions for active development work. After following OpenAI’s recommended/required Advanced Account Security migration for TAC/Daybreak Blue access, the desktop app can no longer open any of those existing sessions. Web ChatGPT still works, and CLI may be usable as a fallback, but it does not replace the desktop workflow/session continuity.
This looks closely related to #39803 and #39162, but in my case the trigger is specifically reproducible immediately after enabling Advanced Account Security with physical FIDO keys, matching this issue (#40611).
I can provide sanitized desktop logs/screenshots if maintainers need them. No recovery codes, FIDO PINs, tokens, account IDs, or other authentication secrets are included here.
Additional diagnostic result: the issue reproduces identically on a completely separate mobile/cellular network.
Mobile hotspot isolation test
Disabled the Mac's normal LAN/Ethernet path.
Disconnected from the usual FRITZ!Box Wi‑Fi/router network.
Connected the Mac to an iPhone Personal Hotspot using the phone's mobile/cellular data connection.
Reauthenticated successfully with the Yubico FIDO key.
OpenAI again sent a successful App: Codex sign-in notification; the approximate location changed, confirming the login used the separate mobile network path.
ChatGPT.app opened successfully and appeared authenticated.
I then used a new chat, submitted a simple test prompt, and received a response indicating the agent was ready.
Immediately afterward, the desktop app again switched to “Sign in to ChatGPT”.
So the failure is not limited to my normal router/Wi‑Fi/LAN network and is reproducible over an independent cellular hotspot as well.
This also broadens the trigger observed in my case: it is not only opening an existing conversation. After a fresh successful login, a new-chat interaction can complete and then the app loses authentication immediately afterward.
No visible error code or error text is shown before the redirect.
Additional workaround test: re-authentication through Chrome Incognito did not resolve the desktop auth loop on my macOS setup.
Incognito test performed
Fully quit ChatGPT.app.
Opened a fresh Chrome Incognito window.
Re-authenticated successfully to ChatGPT/OpenAI in that Incognito session using the same physical Yubico FIDO key.
Confirmed the Incognito browser session was authenticated successfully.
Opened https://chatgpt.com/codex/open-app?source=login&app_brand=chatgpt from the authenticated Incognito session.
Browser displayed: “You are signed in and can close this tab” with the Open ChatGPT button.
Clicking Open ChatGPT brought ChatGPT.app to the foreground, but the desktop UI remained on “Sign in to ChatGPT / Continue to sign in” and did not accept/attach the authenticated Incognito session.
So, for this affected account/build, the Incognito re-authentication workaround reported by other users in this thread is not sufficient. The browser is authenticated, but the desktop app still does not establish/retain the corresponding authenticated state.
Sanitized desktop-log confirmation from the affected macOS machine:
Environment confirmed in logs
macOS 15.7.7 (arm64)
ChatGPT Desktop 26.820.60940
Build 7119
Bundle ID com.openai.codex
Repro log sequence (existing conversation)
The desktop app is initially authenticated and the thread resumes successfully, then the auth state collapses immediately after an account-settings request:
This sequence is repeated multiple times in the logs when existing conversations are opened.
New-chat reproduction is also captured
During the separate mobile-hotspot test, the logs show a new turn starting/completing, then the same authentication collapse:
Received turn/started for unknown conversation
Received turn/completed for unknown conversation
desktop_fetch_auth_401 hadToken=true target="GET https://chatgpt.com/backend-api/accounts/[REDACTED]/settings" ... willRetry=true
app_server_connection.auth_status_result ... hasToken=false nullReason=auth_token_missing refreshToken=true tokenExpiryState=missing
chatgpt-account-lookup ... authenticatedAccountPresent=false failureType=account_info_token_unavailable
sa_server_request_failed ... "Missing valid access token or actor biscuit" ... status=401
Additional clue
An earlier log entry from the same desktop client shows the account-settings endpoint returning:
HTTP 401: "Must use workspace account for this operation"
against /accounts/{account_id}/settings.
This is very close to the failure described in #39189: a personal Pro account receives a workspace-only settings 401, after which the unified desktop client drops/detaches the otherwise valid ChatGPT auth state.
No tokens, account IDs, conversation IDs, local usernames, FIDO secrets, or recovery material are included in this comment.
Sanitized desktop-log confirmation from the affected macOS machine:
Environment confirmed in logs
macOS 15.7.7 (arm64)
ChatGPT Desktop 26.820.60940
Build 7119
Bundle ID com.openai.codex
Repro log sequence (existing conversation)
The desktop app is initially authenticated and the thread resumes successfully, then the auth state collapses immediately after an account-settings request:
This sequence is repeated multiple times in the logs when existing conversations are opened.
New-chat reproduction is also captured
During the separate mobile-hotspot test, the logs show a new turn starting/completing, then the same authentication collapse:
Received turn/started for unknown conversation
Received turn/completed for unknown conversation
desktop_fetch_auth_401 hadToken=true target="GET https://chatgpt.com/backend-api/accounts/[REDACTED]/settings" ... willRetry=true
app_server_connection.auth_status_result ... hasToken=false nullReason=auth_token_missing refreshToken=true tokenExpiryState=missing
chatgpt-account-lookup ... authenticatedAccountPresent=false failureType=account_info_token_unavailable
sa_server_request_failed ... "Missing valid access token or actor biscuit" ... status=401
Additional clue
An earlier log entry from the same desktop client shows the account-settings endpoint returning:
HTTP 401: "Must use workspace account for this operation"
against /accounts/{account_id}/settings.
This is very close to the failure described in #39189: a personal Pro account receives a workspace-only settings 401, after which the unified desktop client drops/detaches the otherwise valid ChatGPT auth state.
No tokens, account IDs, conversation IDs, local usernames, FIDO secrets, or recovery material are included in this comment.
Yeah, I think this is why I had to go use a VPN. Incognito by itself didn't work for me. I found someone had recommended a VPN on some Reddit thread and it was this weird roundabout way. I don't have the Reddit thread anymore and I had to troubleshoot for hours. I think even at one point I was logging in really quickly without VPN then turning it on after really fast after it got my passkey. It was genuinely strange. I was mucking about with the data storage and I noticed it kept replacing the values after I tried clearing it. Again, YMMV, but it was a genuine pain in the butt.
Workaround / recovery update — desktop sign-out appears to be the critical missing step
I have now recovered normal Codex Desktop use on the affected macOS machine while keeping Advanced Account Security enabled and without clearing browser cookies/history or changing the registered FIDO keys.
The sequence that worked was:
Fully quit ChatGPT Desktop.
In the normal Chrome browser session, explicitly sign out of ChatGPT Web using the ChatGPT account menu.
Fully quit Chrome (Cmd+Q).
Reopen Chrome normally (not Incognito).
Sign back into ChatGPT Web successfully with the same account / Yubico FIDO flow.
Open ChatGPT Desktop.
Important: Desktop initially still appeared signed in, so I explicitly used the ChatGPT Desktop application menu to sign out of the desktop app as well.
Start the Desktop sign-in again.
Return to Codex and open an existing conversation (Codex-Master #1).
Existing conversation loaded normally and I was able to send a new message and receive a response without being redirected back to the sign-in screen.
I have since continued interacting with the existing session successfully.
Why this seems important
Earlier troubleshooting repeatedly refreshed/recreated browser-side authentication and even removed server-side Codex sessions, but the Desktop app itself was not always explicitly signed out because it could still look authenticated before the first real Codex interaction triggered the 401/auth collapse.
The successful recovery suggests there may be two independently stale auth/account-context states involved:
browser/web account state, and
Desktop-local account/auth state.
Refreshing only the web authentication is insufficient if Desktop continues holding its previous account/workspace context. Explicitly signing out inside ChatGPT Desktop, after refreshing the web login, appears to force the Desktop state to rebuild correctly.
Important controls
Advanced Account Security remains enabled.
Both physical Yubico FIDO keys remain registered.
No recovery codes were used.
No Chrome cookies or history were manually cleared.
No app data / Codex thread database was deleted.
No network/VPN workaround was required.
Current ChatGPT Desktop version during the successful recovery: 26.820.80927 (build 7271).
I would recommend prioritizing the explicit Desktop sign-out + re-sign-in step in troubleshooting for this specific 401 -> auth_token_missing / account-workspace-context loop. This may be a workaround rather than the underlying fix, but it restored normal use on this machine.
Activity
github-actions commentedon Aug 25, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
pkqs90 commentedon Aug 25, 2026
To provide more context, after I disabled "Advanced Account Security", I am still stuck in the endless logout loop.
danielchristiancazares commentedon Aug 25, 2026
What I had to do was buy a VPN, clear my cache, restart my PC, and then go into Incognito mode and use the exact same login method (Apple) to login.
For some reason that worked and I have no idea why. IDK if that'll work for you and I'd try the without a VPN purchase but maybe try restarting your router? I'm not too sure what exactly allowed it to work.
bigs commentedon Aug 25, 2026
Had this exact same issue. The fix was just to re-authenticate via an incognito browser as well. Would say the VPN is overkill. Thanks @danielchristiancazares, this was driving me nuts. @pkqs90 worth a try.
danielchristiancazares commentedon Aug 25, 2026
Glad I could help.
Zome59 commentedon Aug 27, 2026
I can reproduce this on a newer ChatGPT/Codex desktop build, and the failure is blocking access to all existing Codex conversations.
Environment
What happens
Hardware-key authentication itself succeeds. The browser reports a successful login, OpenAI sends a “New sign-in” notification for App: Codex, and a fresh Codex session appears under ChatGPT → Settings → Security and Login → Active Sessions.
The desktop app then opens normally and shows my projects/conversation list. A fresh/new-chat surface can remain open. However, the moment I open any existing Codex conversation, the conversation starts to load briefly and the desktop app immediately switches back to “Sign in to ChatGPT”.
I reproduced this with multiple unrelated existing conversations, including conversations in different project contexts, so it is not isolated to one thread/project.
Clean reproduction performed
ChatGPT.appand selected Continue to sign in.This was also reproduced in an earlier clean login attempt; each successful browser/FIDO login created a new Codex session, but opening an existing conversation still caused the desktop UI to lose authentication.
Expected behavior
After a successful Advanced Account Security / FIDO authentication, the desktop app should keep the authenticated Codex session and allow existing conversations to open normally.
Actual behavior
Successful FIDO login → fresh server-side Codex session created → desktop appears authenticated → opening any existing Codex conversation → immediate return to sign-in screen.
Troubleshooting already completed
ChatGPT.appis being usedImpact
Productivity-blocking. I use existing Codex desktop sessions for active development work. After following OpenAI’s recommended/required Advanced Account Security migration for TAC/Daybreak Blue access, the desktop app can no longer open any of those existing sessions. Web ChatGPT still works, and CLI may be usable as a fallback, but it does not replace the desktop workflow/session continuity.
This looks closely related to #39803 and #39162, but in my case the trigger is specifically reproducible immediately after enabling Advanced Account Security with physical FIDO keys, matching this issue (#40611).
I can provide sanitized desktop logs/screenshots if maintainers need them. No recovery codes, FIDO PINs, tokens, account IDs, or other authentication secrets are included here.
Zome59 commentedon Aug 27, 2026
Additional diagnostic result: the issue reproduces identically on a completely separate mobile/cellular network.
Mobile hotspot isolation test
So the failure is not limited to my normal router/Wi‑Fi/LAN network and is reproducible over an independent cellular hotspot as well.
This also broadens the trigger observed in my case: it is not only opening an existing conversation. After a fresh successful login, a new-chat interaction can complete and then the app loses authentication immediately afterward.
No visible error code or error text is shown before the redirect.
Zome59 commentedon Aug 27, 2026
Additional workaround test: re-authentication through Chrome Incognito did not resolve the desktop auth loop on my macOS setup.
Incognito test performed
https://chatgpt.com/codex/open-app?source=login&app_brand=chatgptfrom the authenticated Incognito session.So, for this affected account/build, the Incognito re-authentication workaround reported by other users in this thread is not sufficient. The browser is authenticated, but the desktop app still does not establish/retain the corresponding authenticated state.
Zome59 commentedon Aug 27, 2026
Sanitized desktop-log confirmation from the affected macOS machine:
Environment confirmed in logs
com.openai.codexRepro log sequence (existing conversation)
The desktop app is initially authenticated and the thread resumes successfully, then the auth state collapses immediately after an account-settings request:
This sequence is repeated multiple times in the logs when existing conversations are opened.
New-chat reproduction is also captured
During the separate mobile-hotspot test, the logs show a new turn starting/completing, then the same authentication collapse:
Additional clue
An earlier log entry from the same desktop client shows the account-settings endpoint returning:
against
/accounts/{account_id}/settings.This is very close to the failure described in #39189: a personal Pro account receives a workspace-only settings 401, after which the unified desktop client drops/detaches the otherwise valid ChatGPT auth state.
No tokens, account IDs, conversation IDs, local usernames, FIDO secrets, or recovery material are included in this comment.
ctech1313 commentedon Aug 27, 2026
Confirmed Incognito browser as workaround for me too.
danielchristiancazares commentedon Aug 29, 2026
Yeah, I think this is why I had to go use a VPN. Incognito by itself didn't work for me. I found someone had recommended a VPN on some Reddit thread and it was this weird roundabout way. I don't have the Reddit thread anymore and I had to troubleshoot for hours. I think even at one point I was logging in really quickly without VPN then turning it on after really fast after it got my passkey. It was genuinely strange. I was mucking about with the data storage and I noticed it kept replacing the values after I tried clearing it. Again, YMMV, but it was a genuine pain in the butt.
Zome59 commentedon Aug 29, 2026
Workaround / recovery update — desktop sign-out appears to be the critical missing step
I have now recovered normal Codex Desktop use on the affected macOS machine while keeping Advanced Account Security enabled and without clearing browser cookies/history or changing the registered FIDO keys.
The sequence that worked was:
Cmd+Q).Codex-Master #1).I have since continued interacting with the existing session successfully.
Why this seems important
Earlier troubleshooting repeatedly refreshed/recreated browser-side authentication and even removed server-side Codex sessions, but the Desktop app itself was not always explicitly signed out because it could still look authenticated before the first real Codex interaction triggered the 401/auth collapse.
The successful recovery suggests there may be two independently stale auth/account-context states involved:
Refreshing only the web authentication is insufficient if Desktop continues holding its previous account/workspace context. Explicitly signing out inside ChatGPT Desktop, after refreshing the web login, appears to force the Desktop state to rebuild correctly.
Important controls
Current ChatGPT Desktop version during the successful recovery: 26.820.80927 (build 7271).
I would recommend prioritizing the explicit Desktop sign-out + re-sign-in step in troubleshooting for this specific
401 -> auth_token_missing/ account-workspace-context loop. This may be a workaround rather than the underlying fix, but it restored normal use on this machine.mikayil-dev commentedon Aug 30, 2026
Seems to be fixed for me with the latest update.
pkqs90 commentedon Aug 31, 2026
confirm its fixed with latest update