[Windows][26.820.9563.0] Codex Desktop repeatedly loses auth after account-settings 401 while ChatGPT Web remains signed in

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

What version of the Codex App are you using (From “About Codex” dialog)?

26.820.9563.0

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex Desktop on Windows repeatedly loses authentication during normal use and returns to the "Sign in to ChatGPT" screen.

ChatGPT Web remains signed in and functional at the same time.

The Desktop logs repeatedly show the following authentication failure sequence:

GET /backend-api/accounts/{account_id}/settings
→ HTTP 401

app_server_connection.auth_status_result
authMethod=chatgpt
hasToken=false
nullReason=auth_token_missing
refreshToken=true
tokenExpiryState=missing

chatgpt-account-lookup
authenticatedAccountPresent=false
failureType=account_info_token_unavailable
result=failed

sa_server_request_failed
errorMessage="Missing valid access token or actor biscuit"
status=401

Before the authentication state is lost, the account-settings request can show:

desktop_fetch_auth_401
hadToken=true
tokenSource=cached
willRetry=true

Afterward, subsequent requests show:

hadToken=false
skipRetryReason=no_token_attached

and return HTTP 401 Unauthorized.

Signing in again temporarily restores the Desktop session, but the same failure repeats.

Interestingly, Codex background work may still complete and Windows may display a task-completion notification even after the Desktop UI has returned to the sign-in screen.

ChatGPT Web remains authenticated when this occurs.

No account IDs, tokens, email addresses, or other PII are included above.

What steps can reproduce the bug?

  1. Launch Codex Desktop on Windows.
  2. Sign in successfully with ChatGPT.
  3. Use Codex normally by opening an existing conversation or starting a task.
  4. Wait while Codex remains open and in normal use.
  5. Codex Desktop eventually performs an account-settings request.
  6. /backend-api/accounts/{account_id}/settings returns HTTP 401.
  7. Desktop auth state changes to:

hasToken=false
nullReason=auth_token_missing
refreshToken=true
tokenExpiryState=missing

  1. Account lookup then reports:

authenticatedAccountPresent=false
failureType=account_info_token_unavailable

  1. Codex Desktop returns to the "Sign in to ChatGPT" screen.
  2. ChatGPT Web remains signed in.
  3. Sign in to Codex Desktop again.
  4. The issue reproduces again.

This has reproduced multiple times during the same day.

Session ID: Not included because I do not know which identifier is safe and useful for this report. I can provide a sanitized session identifier privately if requested.

Token-limit usage: Not applicable / unknown.

Context-window usage: Not applicable; the logout can occur independently of high context usage.

What is the expected behavior?

After successful ChatGPT authentication, Codex Desktop should remain authenticated during normal use.

A 401 response from the account-settings endpoint should not cause an otherwise authenticated Desktop session to lose its access-token state while a refresh token is still present.

If token renewal is required, Codex should successfully refresh the access token or surface a recoverable authentication error instead of entering a repeated sign-in loop.

ChatGPT Web and Codex Desktop should remain consistently authenticated unless the account session is actually revoked.

Additional information

Environment:

Windows 11
x64
Codex Desktop 26.820.9563.0

Security configuration checked:

Advanced Account Security: Not enrolled
Lockdown Mode: Off
Developer Mode: Off
Authenticator MFA: Off
SMS MFA: Off

Important observations:

ChatGPT Web remains signed in while Codex Desktop signs out.
Re-authenticating Codex Desktop creates another Codex session, but the issue eventually repeats.
Background Codex work may continue and Windows task-completion notifications may still appear after the Desktop UI has returned to the sign-in screen.
The failure has reproduced repeatedly.
Microsoft Store currently offers no newer Desktop update on this machine.
A winget upgrade check also reports no newer available package.
Advanced Account Security is not enrolled, so this reproduction does not require that feature to be enabled.

The observed failure sequence is:

authenticated
→ account-settings HTTP 401
→ auth_token_missing
→ refreshToken=true
→ account_info_token_unavailable
→ Desktop sign-in screen

This appears very similar to existing Windows Codex Desktop authentication issue #39850.

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 22 hours ago

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

  • #39850
  • #39925
  • #41044
  • #41010
  • #39803

Powered by Codex Action

GeneTang1219 · 20 hours ago

Additional isolation result:

On the exact same Windows PC, same Codex Desktop installation, same network, and same system configuration, a different OpenAI/ChatGPT account works normally.

The issue only occurs with the affected account.

For the affected account:

  • ChatGPT Web works normally
  • Codex Web works normally
  • Codex Desktop signs in successfully
  • A new conversation with no message stays signed in
  • Sending the first message causes the Desktop app to sign out
  • Opening an existing conversation causes sign-out within approximately 1–2 seconds

The Desktop logs show:
/backend-api/accounts/{account_id}/settings
→ HTTP 401
→ auth_token_missing
→ refreshToken=true
→ account_info_token_unavailable
→ Desktop switches to the sign-in screen

also tested:

  • clean ~/.codex/auth.json re-auth
  • system clock synchronization and reboot
  • sandbox = "elevated" vs "unelevated"

None resolved the issue.

Because another account works normally on the same machine, this appears account-specific. Please check the affected account’s backend workspace/account-settings routing and Codex Desktop authentication state.

PROFFESSOR0x · 18 hours ago

very simple i fixed it by re signing in but with the codex cli and then use the app
because the cli and app uses the same config files
other reason to use the cli : i have problem with auto open browser to signin using app i just copied the url from the cli and used it
note: i used the same account i didn't change it

im sorry i know my english is not good but i want to help

ato4040 · 6 hours ago

Additional reproduction from another affected Windows Codex Desktop user on 2026-08-28 (Asia/Taipei).

The app version is currently unknown because Codex is now stuck on the authentication screen and I cannot access “About Codex”. I intentionally did not update the app even though an Update button was visible, because I had three long-running Codex tasks active overnight.

Observed failure progression:

  1. Three Codex tasks were running overnight.
  2. By morning, two had completed and one was still running.
  3. The still-running task remained visible and its live work/progress could still be observed.
  4. However, the two completed tasks could no longer be opened to review their execution history or final delivery.
  5. Other historical Codex tasks/conversations also became inaccessible.
  6. MCP functionality stopped working.
  7. Android/ChatGPT Codex Remote also stopped being able to reach/control this desktop Codex instance.
  8. Other Codex Desktop functions were broadly degraded, while the one already-active task still appeared to continue running.
  9. During troubleshooting, Codex Desktop suddenly signed itself out without me intentionally signing out.
  10. Attempting to sign back in opened the browser flow, but the Desktop app became stuck on the screen saying “Continue signing in in your browser”.
  11. A red error banner also appeared in Codex Desktop referring to a server-related error (exact text was not captured before it disappeared).
  12. I am now unable to access Codex Desktop normally or verify the installed version number.

Important observations:

  • ChatGPT itself remains usable with the same account while Codex Desktop is stuck in authentication.
  • I have not reset, repaired, reinstalled, cleared app data, deleted .codex, rebooted, or applied the pending update because I wanted to avoid destroying recoverable session/task state.
  • The most concerning symptom is that an already-running task appeared to remain alive while history/session loading, MCP, Remote Control, and finally Desktop authentication failed around it.
  • This makes the issue look broader than a simple sign-in failure and may involve Desktop runtime/session state, history/thread loading, MCP, Remote registration/synchronization, and authentication failing together.

If useful, I can provide a screenshot of the Desktop authentication screen showing the app stuck on “Continue signing in in your browser”. No tokens, cookies, account IDs, or other sensitive authentication material will be shared.

geh04743-ops · 2 hours ago

Independent reproduction from another Windows Codex Desktop installation.

Environment:

  • Codex Desktop: 26.820.9563.0
  • Windows 11 x64
  • ChatGPT sign-in
  • The failure is triggered by opening/switching existing project conversations and can recur after signing in again.

Sanitized failure chain observed in Desktop logs:

GET /backend-api/accounts/{account_id}/settings
-> HTTP 401
-> forced auth refresh
-> refresh_token_invalidated
-> hasToken=false / auth_token_missing
-> subsequent desktop_fetch_auth_401 events show:
   hadToken=false
   skipRetryReason=no_token_attached
   tokenSource=cached
-> Desktop returns to sign-in

Additional isolation evidence:

  • Re-signing in only restores the app temporarily.
  • Changing the local credential-store setting did not provide a durable fix.
  • While remaining in one control thread and not opening the Settings UI, 22 additional desktop_fetch_auth_401 events occurred after a clean log baseline. All were hadToken=false / no_token_attached / cached. No new logout event occurred during that short interval, showing that the broken no-token state can continue in the background and is not limited to the Settings UI.
  • Opening or switching conversations is the high-impact trigger because it can make completed and historical task conversations inaccessible even while an already-running task may continue.

Requested fix and regression coverage:

  1. Treat a 401 from /accounts/{account_id}/settings as feature/query scoped; it must not invalidate the whole Desktop session.
  2. Do not discard a still-usable access token merely because refresh failed.
  3. Handle refresh_token_invalidated deterministically without entering a repeated no-token 401 loop.
  4. Add a Windows Desktop regression test covering: one ChatGPT login, first token refresh, full app restart, and repeated opening of conversations across multiple projects.
  5. Please mention the fix in release notes so affected users can verify the first fixed build.

No tokens, cookies, account IDs, email addresses, thread IDs, session IDs, or local usernames are included. Sanitized logs can be provided if a maintainer requests a specific time window or event sequence.