openai / openai/codex

Desktop app repeatedly signs out with "Missing valid access token or actor biscuit" / 401 Unauthorized — not fixed by reinstall

Open
#40,373 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

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

26.818.8289.0

What subscription do you have?

Pro

What platform is your computer?

Windows 11 Pro

What issue are you seeing?

Subject: Desktop app repeatedly signs out with "Missing valid access token or actor biscuit" / 401 Unauthorized — not fixed by reinstall

App: ChatGPT desktop (Windows, Microsoft Store build — package OpenAI.Codex)
Package version: 26.818.8289.0
Runtime/bundle version seen in logs: 26.819.11345 (also seen: release 26.818.61809)
OS: Windows 11 Pro

Summary:
The desktop app randomly signs me out while I'm actively using it (e.g. opening an existing conversation, or creating a Task). I have to log back in, and it can happen again within minutes. This is NOT caused by a network drop — I have logs showing the local VPN client had zero disconnect/reconnect events during the failure window, so the client is losing its session while the network connection itself is fully intact and idle.

I already ruled out a corrupted local profile: I fully uninstalled the app via Windows Settings and reinstalled it. The Chromium profile files (Cookies, Local State, etc.) were freshly created at reinstall time, and the bug reproduced again about an hour later, in that same fresh profile. So this isn't stale cache — it's reproducible from a clean install.

What the logs show (from LocalCache\Local\Codex\Logs...\codex-desktop-*.log), all timestamps UTC:
09:44:35.855 — last successful call, method=account/read, errorCode=null (everything fine)

09:44:37.395 — first sign of trouble:
[electron-fetch-wrapper] desktop_fetch_auth_401 hadToken=true skipRetryReason=null
target="GET https://chatgpt.com/backend-api/accounts/:param/settings" tokenSource=cached willRetry=true
→ a request sent with a cached token gets rejected with 401 by the server.

09:44:38.704 — the app checks its own auth status right after:
[AppServerConnection] app_server_connection.auth_status_result authMethod=chatgpt cacheWrite=null
hasToken=false nullReason=auth_token_missing refreshToken=true tokenExpiryState=missing
→ the app now reports it has NO access token (hasToken=false, tokenExpiryState=missing),
even though a refresh token IS available (refreshToken=true).

09:44:39.123 — [electron-fetch-wrapper] desktop_fetch_auth_401 hadToken=false skipRetryReason=no_token_attached
target="GET https://chatgpt.com/backend-api/wham/:param/:param" willRetry=false

09:44:40.223 — [electron-message-handler] sa_server_request_failed attachAuth=true attachIntegrityState=true
errorMessage="{"detail":"Missing valid access token or actor biscuit"}"

09:44:41.385 onward, repeating roughly every 60 seconds for 10+ minutes straight (09:44:41, 09:45:24,
09:46:25, 09:47:26, 09:48:27, 09:49:28, 09:50:29, 09:51:30, 09:52:31, 09:53:25, 09:53:32, 09:54:28, 09:54:33...):
[electron-message-handler] sa_server_request_failed attachAuth=true attachIntegrityState=true
errorMessage={"detail":"Unauthorized"}
→ the app never recovers on its own. It just keeps retrying and failing every minute, permanently
"logged out" in the UI until I manually sign in again.

What steps can reproduce the bug?

Feedback ID: no-active-thread-01a03337-ce20-7371-bf5a-87c07ae3864c

What is the expected behavior?

No response

Additional information

No response

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 with the logs under LocalCache\Local\Codex\Logs...\codex-desktop-*.log and trace the auth_status_result and desktop_fetch_auth_401 events around the cached-token rejection. Use the reported clean-install reproduction and Feedback ID to investigate; done means the app no longer enters the repeated 401/Unauthorized loop or signs the user out while the refresh token remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, rust
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.