openai / openai/codex

[macOS] Codex Desktop auth loop persists on 26.820; rollback to 26.810.52044 fixes it

Open
#41,044 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app auth bug
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using?

Affected versions tested:

  • 26.818.61809
  • 26.820.xxxxx (exact patch version not recorded before uninstalling)

Last known-good version on the same machine:

  • 26.810.52044
What platform is your computer?

macOS on Apple Silicon (arm64)

What issue are you seeing?

Codex Desktop repeatedly loses authentication and returns to the ChatGPT sign-in screen when opening an existing conversation or starting/using a new Codex conversation.

Important control tests:

  • ChatGPT web works normally with the same account.
  • Codex CLI works normally with the same account and can execute prompts.
  • A newly started Codex task can still execute and modify code even while the Desktop UI loses authentication.
  • Reinstalling the latest official Desktop app does not fix the issue.
  • Clearing caches and resetting Codex Application Support/preferences does not fix the issue.

The strongest A/B test is version-specific:

  • 26.818.61809 -> broken
  • rollback to 26.810.52044 -> works normally
  • update to 26.820.xxxxx -> still broken
  • rollback again to 26.810.52044 -> works normally again

This strongly suggests a Desktop authentication regression in newer builds rather than an account, network, project, or local conversation-data issue.

Relevant log sequence

Sanitized log sequence from the affected Desktop build:

desktop_fetch_auth_401 hadToken=true ... target="GET https://chatgpt.com/backend-api/accounts/:param/settings" tokenSource=cached willRetry=true

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

sa_server_request_failed ... errorMessage="{\"detail\":\"Missing valid access token or actor biscuit\"}" ... status=401

# subsequent requests
desktop_fetch_auth_401 hadToken=false skipRetryReason=no_token_attached ... willRetry=false

Subsequent /wham/* requests return Unauthorized because the Desktop no longer attaches a token.

Steps to reproduce
  1. Install/update Codex Desktop to 26.818.61809 or a 26.820.x build on macOS Apple Silicon.
  2. Sign in with ChatGPT successfully.
  3. Open an existing Codex conversation, or start a new conversation and submit a task.
  4. The task may still execute successfully in the underlying Codex runtime.
  5. The Desktop UI loses authentication and returns to the sign-in screen.
  6. Sign in again; the loop reproduces.
  7. Roll back only the Desktop app to official signed/notarized 26.810.52044 while keeping the same machine, account, network, and project data.
  8. Observe that Codex Desktop works normally again.
Troubleshooting already performed
  • Quit/restarted the app
  • Signed out/in again
  • Cleared system/app caches
  • Renamed/reset Codex Application Support directories and preferences
  • Reinstalled the latest official Desktop app
  • Verified ChatGPT web works on the same account
  • Verified Codex CLI works on the same account
  • Verified the issue reproduces on newer Desktop versions and disappears immediately after rollback to 26.810.52044
Possibly relevant account history

Shortly before noticing the issue, I changed my ChatGPT password. I also accidentally signed Codex Desktop into a different ChatGPT account, then signed out and switched back to my primary account. I do not know whether either event is related or merely coincidental.

Expected behavior

Codex Desktop should remain authenticated after opening or running a conversation. A 401 from /accounts/{account_id}/settings should not collapse an otherwise valid authenticated state into auth_token_missing and force a login loop.

The fact that the same account and CLI continue working, and that rollback to 26.810.52044 fixes the issue immediately, suggests the regression is specific to newer Desktop authentication handling.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue on 26.818.61809 or 26.820.x and compare it with 26.810.52044, then inspect the authentication flow around desktop_fetch_auth_401, app_server_connection.auth_status_result, and GET /backend-api/accounts/{account_id}/settings. Done means newer Desktop builds retain the token after a 401 where appropriate and no longer return the UI to the sign-in loop; no test file is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.