ChatGPT Desktop 26.818.41705: valid OAuth token rejected with 401 "Missing valid access token or actor biscuit" on every session, started immediately after auto-update

Open 💬 4 comments Opened Aug 22, 2026 by SEDIDEL
💡 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.818.41705

What subscription do you have?

Pro x20

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

After the Sparkle auto-update to ChatGPT Desktop 26.818.41705 (build 6971), every Desktop session loses ChatGPT authentication. A freshly minted, unexpired OAuth token is rejected by chatgpt.com/backend-api with 401, the Desktop then discards its own token cache, and the app drops to a signed-out state. The same account works normally in the browser and in the iOS/Android apps at the same moment, from the same machine and network.

Environment

macOS 26.6.2 (25G83), Apple silicon (Mac17,8)
ChatGPT Desktop 26.818.41705 (build 6971), bundle ID com.openai.codex
Bundled app-server 0.149.0-alpha.4.1
ChatGPT managed OAuth, auth_mode: chatgpt, plan pro
Single install in /Applications/ChatGPT.app, signature and embedded.provisionprofile intact
Migrated from the legacy ChatGPT app — every launch logs [legacy-chatgpt-sparkle-updater] Finished disarming legacy ChatGPT Sparkle updater cache=cleared

Failure signature (identical in every session; this instance is app session f5a88e01-3b3e-4866-9b2a-00aa2501666d, all times UTC)

19:01:46.965  info    [electron-message-handler] account_login_completed success=true
19:01:47.846  info    [chatgpt-account-lookup] completed authenticatedAccountPresent=true authMethod=chatgpt
              ... 63 seconds of normal operation ...
19:02:51.517  info    [devicecheck-attestation] DeviceCheck attestation generated
                      deviceCheckLatencyMs=17.49 durationMs=17
19:02:51.640  warning [electron-fetch-wrapper] desktop_fetch_auth_401 hadToken=true skipRetryReason=null
                      target="GET https://chatgpt.com/backend-api/accounts/{account_id}/settings"
                      tokenSource=cached willRetry=true
19:02:51.927  warning [AppServerConnection] app_server_connection.auth_status_result authMethod=chatgpt
                      cacheWrite=null hasToken=false nullReason=auth_token_missing
                      refreshToken=true tokenExpiryState=missing
19:02:51.953  info    [chatgpt-account-lookup] completed authenticatedAccountPresent=false
                      failureType=account_info_token_unavailable
19:02:52.088  warning [electron-message-handler] sa_server_request_failed attachAuth=true attachIntegrityState=true
                      errorMessage="{\"detail\":\"Missing valid access token or actor biscuit\"}"
                      routePattern=/accounts/{account_id}/settings status=401
19:02:52.153  warning [electron-fetch-wrapper] desktop_fetch_auth_401 hadToken=false
                      skipRetryReason=no_token_attached willRetry=false

The first failing call carries a token (hadToken=true). Every call after it carries none (hadToken=false, no_token_attached) because the Desktop invalidates its own token cache in response to the 401.

Endpoints returning 401

GET /backend-api/accounts/{account_id}/settings
GET /backend-api/accounts/check/{version}
GET /backend-api/wham/tasks/list
GET /backend-api/wham/usage
GET /backend-api/wham/onboarding/context
GET /backend-api/payments/payment_methods
GET /backend-api/ps/plugins/home
GET /backend-api/ps/plugin-categories/{category_slug}/plugins

Both error bodies observed:

json
{"detail":"Missing valid access token or actor biscuit"}
{"detail":"Unauthorized"}

The bundled Rust app-server hits the same wall independently of the Electron shell, so this is not specific to one transport:

remote_connections.manager_state_set nextError={"code":"connection-failed","message":
  "failed to warm featured plugin ids cache",
  "error":"remote featured plugin request to
   https://chatgpt.com/backend-api/plugins/featured?platform=codex
   failed with status 401 Unauthorized: {\"detail\":\"Unauthorized\"}"}

The token being rejected is valid. Decoded from ~/.codex/auth.json right after a successful account_login_completed, while the Desktop was already reporting auth_token_missing:

auth_mode     : chatgpt
last_refresh  : 2026-08-22T18:48:55Z      (8 seconds before the 401)
access_token  : iat 2026-08-22T18:48:54Z
                exp 2026-09-01T18:48:54Z   -> NOT expired, 10 days remaining
                iss https://auth.openai.com
                aud ["https://api.openai.com/v1"]
                scp [openid, profile, email, offline_access,
                     api.connectors.read, api.connectors.invoke]
claim https://api.openai.com/auth:
  chatgpt_account_id : <matches the {account_id} in the failing request path>
  chatgpt_plan_type  : pro
  amr                : [google, otp, mfa, otp_email, pop, passkey]

account_id in auth.json == chatgpt_account_id in the JWT == {account_id} in the URL that returns 401. tokenExpiryState=missing is reported against a token that is present and has 10 days of validity left.

What steps can reproduce the bug?

Reproduces on 26 of 26 launches on this machine. No code snippet applies — this is the packaged Desktop app with a stock configuration.

Launch ChatGPT Desktop 26.818.41705 on macOS 26.6.2, signed in with ChatGPT managed OAuth.
Use the app normally — open any thread, or leave it idle.
Within 8 seconds to 34 minutes, the app issues GET /backend-api/accounts/{account_id}/settings, receives 401, and drops to a signed-out state.
Sign in again. account_login_completed success=true, a new valid token is written to ~/.codex/auth.json, and the cycle repeats — the fastest observed recurrence was 7 seconds after a successful login.

Session IDs (app session, from ~/Library/Logs/com.openai.codex/2026/08/22/):

f5a88e01-3b3e-4866-9b2a-00aa2501666d   launch 19:01:36Z   first 401 19:02:51Z   (+75s)
f9f2e632-8b7a-4c05-8302-e71cbf64695e   launch 18:55:16Z   first 401 18:55:33Z   (+17s)
320b693d-b0…                           launch 18:48:46Z   first 401 18:49:03Z   (+17s)
fdb9926e-8d3c-4f0c-afd6-f17b7a1ac6fd   launch 18:36:24Z   first 401 18:36:34Z   (+10s)
c9fe28ae-1d3a-40b1-8501-eface6fec0ef   launch 12:38:10Z   first 401 13:11:54Z   (+2024s)

Token limit / context window usage is not applicable — the failure is in the account/settings control-plane call, and it occurs on idle sessions with no turn in flight.

Not required to reproduce: any particular thread. It fails on 232 MB, 35 MB and 11 MB rollouts, on brand-new threads, and in 3 sessions where no thread was ever resumed.

What is the expected behavior?

Two separate things.

  1. The token should be accepted. A freshly minted, unexpired access token whose chatgpt_account_id matches the requested account, sent from an app whose DeviceCheck attestation succeeded ~120 ms earlier, should be accepted by chatgpt.com/backend-api. If it is genuinely invalid, the 401 should say which of the two credentials failed and why — Missing valid access token or actor biscuit names both and distinguishes neither, which makes it impossible to tell a token problem from an attestation or biscuit-minting problem.
  1. A single 401 should not sign the user out. On receiving 401, the Desktop currently discards its stored token and downgrades every subsequent request to hadToken=false / no_token_attached. One rejected control-plane call becomes a full sign-out, and the stored token — still valid for 10 days — is never retried. Expected: the Desktop retains a token that has not expired, retries or refreshes, and surfaces a specific error instead of silently degrading to a signed-out state.

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 5 days ago

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

  • #40138
  • #40074
  • #39925
  • #40029

Powered by Codex Action

CJMVPU · 3 days ago

I can independently reproduce what appears to be the same authentication failure on ChatGPT Desktop for macOS.

Environment

  • macOS
  • ChatGPT Desktop version: 26.818.41705
  • Bundle ID: com.openai.codex
  • Auth mode: chatgpt

Symptom

Login succeeds normally. After starting or using a conversation, the app shows “Reconnecting…” and then returns to the login screen.

The failure is reproducible.

Important detail: the access token is not expired

Immediately after a successful login, I inspected the locally stored JWT metadata without printing the token itself:

auth_mode: chatgpt
last_refresh: 2026-08-25T05:28:01.817352Z
iat: 2026-08-25T05:28:01+00:00
exp: 2026-09-04T05:28:01+00:00
iss: https://auth.openai.com
aud: ['https://api.openai.com/v1']

So the access token had just been issued and still had approximately 10 days of validity remaining.

However, the desktop log shows the following sequence shortly afterwards:

2026-08-25T05:28:01.852Z
account_login_completed ... success=true

About 1 minute 43 seconds later:

2026-08-25T05:29:44.606Z
desktop_fetch_auth_401
hadToken=true
target="GET https://chatgpt.com/backend-api/accounts/:param/settings"
tokenSource=cached
willRetry=true

Then:

2026-08-25T05:29:46.202Z
app_server_connection.auth_status_result
authMethod=chatgpt
hasToken=false
nullReason=auth_token_missing
refreshToken=true
tokenExpiryState=missing

Immediately afterwards, requests are made without an attached token:

desktop_fetch_auth_401
hadToken=false
skipRetryReason=no_token_attached

and:

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

This produces the visible sequence:

Successful login
→ fresh valid token issued
→ /backend-api/accounts/.../settings returns 401 while hadToken=true
→ client auth state becomes auth_token_missing
→ subsequent requests no longer attach a token
→ app shows Reconnecting
→ app returns to login screen

Network checks

I also tested the network path separately:

  • ws.chatgpt.com:443 successfully establishes an HTTP CONNECT tunnel through the proxy
  • TLS 1.3 handshake succeeds
  • certificate validation succeeds
  • HTTP/2 negotiation succeeds
  • chatgpt.com:443 also establishes successfully
  • proxy exit IP remained identical across 10 consecutive checks

So this does not appear to be caused by a changing proxy exit IP or a basic TLS/connectivity failure.

I also confirmed that ~/.codex/auth.json is being updated after authentication, so in my case this is not simply a situation where the auth file is never written.

The key behavior seems to be that a valid authenticated state exists, /backend-api/accounts/.../settings receives a 401, and the desktop client subsequently transitions from hadToken=true to auth_token_missing, despite the freshly issued access token being far from expiration.

This looks very similar to the authentication-state regression reported in this issue.

janneman86 · 3 days ago

Workaround that fixed the older-task logout loop for me

I had the same issue: new tasks worked, but opening an older codex://threads/... task immediately logged me out.

What I verified

I reproduced and investigated this across four different older tasks:

  • The older tasks and their local transcripts were still intact.
  • The local task database passed its integrity checks.
  • The codex:// handler was registered correctly.
  • The app successfully resumed the task first: thread/resume returned errorCode=null.
  • Immediately afterward, authentication failed with 401 Unauthorized and refresh_token_invalidated.

This suggests the logout was caused by stale or invalid desktop authentication—not corrupted older tasks.

What fixed it for me

  1. Open chatgpt.com in your browser.
  2. Open the profile menu and fully Log out, then confirm.

Be aware that this can also sign you out of other ChatGPT sessions.

  1. Return to the Codex/ChatGPT Mac app.
  2. Click Sign in another way.
  3. Choose Email and sign in directly using the email address connected to your ChatGPT account. Do not use Google, Apple, or another social-login option.
  4. Enter the email verification code if requested.
  5. On the Sign in to Codex with ChatGPT page, explicitly select the workspace containing the affected older tasks. In my case, this was Personal account. My personal and company workspace both use the same email address.
  6. Click Continue/Open ChatGPT, return to the desktop app, and try opening the older tasks again.

After the full browser logout and direct email sign-in, I successfully opened all four older tasks without being logged out. The task resumes continued to return errorCode=null, with no further refresh_token_invalidated errors while opening them.

The successful test happened on the same ChatGPT/Codex build that had previously failed. I had staged a reinstall, but the logs confirmed the app was still running from the older copy, so I do not consider reinstalling or renaming the app to be the fix.

I did not delete ~/.codex, its session files, or its SQLite databases. Those contained healthy local task history, and deleting them could cause data loss.

Environment:

  • macOS 27 beta (26A5421a)
  • ChatGPT/Codex 26.818.61809, build 7019

Btw I also have advanced security on so that shouldn't be the issue

I still observed a separate account-settings 401 saying Must use workspace account for this operation, but it no longer logged me out or prevented older tasks from opening. Therefore, this should be considered a workaround rather than a confirmed root-cause fix.

tekyegah65-code · 2 days ago

Subject: Urgent Feedback: Repeated Sign-Outs and Login Redirects in the Codex Desktop App

Dear OpenAI Support Team,

I hope you are doing well.

I am writing to report a persistent authentication problem in the Codex desktop application that has been occurring for approximately two weeks. Unfortunately, this issue has made the desktop application extremely frustrating and, at times, nearly impossible to use.

The problem occurs as follows:

  1. I open the Codex desktop application and successfully sign in with my ChatGPT account.
  2. I create a new task and Codex begins working normally.
  3. After a short period, the application unexpectedly redirects me to the ChatGPT sign-in page.
  4. I complete the authentication process successfully and return to the application.
  5. When I click an active task or even a previously completed task, its contents may appear for approximately one second before the application redirects me to the sign-in page again.
  6. This cycle can repeat 10, 20, or even 30 times.

Importantly, my ChatGPT session in the browser remains active throughout this process. I am not being signed out of ChatGPT in the browser. Only the Codex desktop session repeatedly loses its authenticated state.

The application logs show a very specific sequence:

account_login_completed success=true
authenticatedAccountPresent=true
desktop_fetch_auth_401
auth_token_missing
authenticatedAccountPresent=false
account_info_token_unavailable

In one observed instance, authentication completed successfully, the account was recognized correctly, and approximately 17 seconds later the desktop application reported that the authentication token was missing.

The associated responses include:

401 Unauthorized
Missing valid access token or actor biscuit

There have also been occasional temporary network errors such as:

ERR_NETWORK_CHANGED
ERR_NAME_NOT_RESOLVED
ERR_CONNECTION_RESET
ERR_TIMED_OUT

However, temporary network interruptions or isolated 401 responses should not immediately destroy the authenticated desktop session or force the user back to the sign-in page.

My current environment is:

Operating system: Windows
Codex desktop package: 26.820.7780.0
Bundled Codex CLI: 0.150.0-alpha.8
Authentication method: Sign in with ChatGPT

The Codex CLI continues to report:

Logged in using ChatGPT

even when the desktop application has already returned to the sign-in screen. This suggests that the general ChatGPT authentication remains valid while the desktop-specific account state is being lost.

I respectfully ask the engineering team to reconsider how the desktop application handles temporary authentication and network failures. Ideally, the application should:

  • Retry temporary 401 and network failures with an appropriate backoff.
  • Attempt token refresh before invalidating the desktop session.
  • Preserve the current task and authenticated state during temporary connectivity problems.
  • Display an offline or reconnecting message instead of immediately redirecting to the login screen.
  • Require full reauthentication only when the server has definitively confirmed that the session or refresh token is invalid or revoked.
  • Avoid triggering a complete sign-out because of a single failed request to an account, settings, usage, heartbeat, or task-list endpoint.

Internet connectivity is not equally stable in every country or region. Users may experience brief DNS failures, routing changes, packet loss, or temporary connection resets. A desktop application should tolerate these conditions gracefully instead of repeatedly interrupting the user’s work and forcing a complete login flow.

This behavior creates a very poor and stressful user experience. It disrupts concentration, wastes significant time, and can make users feel that their ongoing work or completed tasks are no longer accessible. If it remains unresolved, it may unfortunately cause users—particularly those in regions with less stable connectivity—to stop using the desktop application or move away from the product entirely.

I greatly appreciate Codex and the work your team is doing. I am sharing this report respectfully because I would very much like to continue using the desktop application, but the current authentication behavior urgently needs improvement.

Please investigate this issue and consider changing the client behavior so that transient 401 responses and temporary network errors do not automatically result in a complete sign-out.

I would be happy to provide additional sanitized logs, timestamps, screenshots, or diagnostic information if needed.

Thank you very much for your time and attention.

Kind regards,
Hamed Abdollahi