Skip to content

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

Description

@GeneTang1219

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appauthIssues related to authentication and accountsbugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions