Repository navigation
Description
What version of the Codex app are you using?
- Windows Store package: 26.1027.3384.0, x64
- Bundled runtime in use:
C:\Users\LYQ\AppData\Local\OpenAI\Codex\bin\22cfb1d302613eae - Bundled
codex.exe --version:codex-cli 0.166.0-alpha.5.1
What subscription do you have?
ChatGPT Plus, signed in with ChatGPT auth (auth_mode: chatgpt in ~/.codex/auth.json).
What operating system are you using?
Windows 11 Pro 25H2, build 26200.9711, x64.
Network: Mihomo / Clash Party with TUN enabled. chatgpt.com is routed through a select group whose default member is a url-test group; egress is US.
What issue are you seeing?
The composer shows a banner:
账户身份验证不可用:桌面端无法从本地 Codex 服务 (app-server) 获取可用的账户身份验证信息。发送消息和加载聊天会受到影响。
("Account authentication unavailable: the desktop app cannot obtain usable account authentication from the local Codex service (app-server). Sending messages and loading chats will be affected.")
The banner does not clear once connectivity returns. It only clears when the codex.exe ... app-server child process is killed and respawned by the app.
Timeline
All timestamps are as logged (UTC). Local offset was UTC+8.
08:45:36Z: previous app-server closed withcode=0. The reason carried in the close payload is acodex_core_plugins::managerwarning:failed to refresh remote installed plugins cache ... failed to send remote plugin catalog request to https://chatgpt.com/backend-api/ps/plugins/installed?limit=200. The app immediately restarts it.08:45:37Z:sa_server_request_failed attachAuth=true errorMessage="Failed to retrieve authentication token", several"Authenticated workspace changed"warnings,chatgpt_pubsub_connection_failed.08:45:47Z: new app-server pid 69048 running.08:47:37Zand08:47:47Z:cloud_picker_identity ... accountChanged=false ... hasAccount=false dataAgeMs=null fetchStatus=null. These are the lasthasAccountsamples before recovery.08:51Z–09:40Z: the proxy node carryingchatgpt.comwent down. Every dial in the proxy log iscontext deadline exceeded.09:41:45Z→09:41:46Z:websocket_reconnect_recovery_startthenwebsocket_reconnect_recovery_done ... refreshRecentConversationsFailed=false. The WebSocket layer reconnected cleanly.09:43Z–09:45Z:tpp-local-executorsampling healthy every 60s,mcp_server_startup_status_updated ... status=ready, everyresponse_routed ... errorCode=null. Noapp_server_connectionerror, crash or exit is logged between the successful reconnect and the manual kill.- At that moment, with the stored access token,
GET https://chatgpt.com/backend-api/mereturns 200 andGET https://chatgpt.com/backend-api/accounts/check/v4-2023-04-27returns 200 through the same proxy (1.3s / 2.4s). The banner was still displayed. 09:46:36Z: killed app-server pid 69048 only (renderer untouched). The app respawned it as pid 47292 within a second.09:46:38Z:cloud_picker_identity ... accountChanged=true ... hasAccount=true.09:46:43Z:chatgpt_pubsub_topic_subscribed. Recovered. The Electron window was never restarted.
Credentials are not the problem
~/.codex/auth.jsonwas valid throughout and is valid now:auth_mode=chatgpt,access_tokenpresent, JWTexpabout 17 hours in the future at the time of the failure,refresh_tokenandaccount_idpresent.codex doctoron the same machine at the same time reports✓ auth auth is configured,stored auth mode chatgpt,auth mode chatgpt,reachability mode ChatGPT auth.
The app-server simply never re-reads or retries.
Failing calls counted in the electron main-process log for the day
491 sa_server_request_failed attachAuth=true errorCode=cloudflare_challenge
134 sa_server_request_failed attachAuth=true errorCode=ERR_CONNECTION_CLOSED
14 Authenticated desktop fetch failed (403)
The 491 Cloudflare challenges cluster between T02 and T07 and stop at 07:35:36Z. The 403s are all inside that window. During the window the account fetch cannot succeed. account/read and getAuthStatus still answer at the RPC level with errorCode=null, i.e. the RPC is fine but carries no account.
Reproducer
- Use the Windows desktop app normally with a working route to
chatgpt.com. - Let the app-server restart itself, or break the
chatgpt.comroute for a few minutes so the account fetch cannot complete. - Restore the route and confirm
GET /backend-api/mereturns 200 with the stored token. - The "account authentication unavailable" banner stays. There is no retry, no toast, no action in the UI.
- Kill only the
codex.exe ... app-serverchild process. The app respawns it and the banner disappears in about two seconds.
Expected: after the transport recovers, the app-server should retry the account fetch, or the UI should offer a retry / re-authenticate action. Currently the only recovery is a manual app-server restart, which most users will not discover.
Related
- Windows: new chats blocked by workspace settings Cloudflare 403 while existing chats still work #55513 — Windows: new chats blocked by workspace settings Cloudflare 403
- [Windows desktop] Your dot disappears and new chats are blocked by workspace-settings errors during repeated Cloudflare challenges #54550 — repeated Cloudflare challenges cause workspace-settings errors
Both cover the Cloudflare 403 trigger. This report is a different surface: the local app-server auth status, which never self-heals after connectivity returns.
Activity
minority commentedon Oct 31, 2026
A couple of days ago, the same issue cropped up: I can't work via the Codex Desktop, only through the cli.
mapleleo-hub commentedon Nov 5, 2026
Thanks for the source pointers, they're useful. Short answer: I can't produce the post-recovery account/read payload you're asking for without instrumenting the Electron main process, so here is what the logs do constrain and what I'm missing.
What the sequence shows:
account/readandgetAuthStatusstill answered at the RPC level witherrorCode=null, but carried no account. The RPC was alive, the payload was empty.GET /backend-api/mereturned 200 andGET /backend-api/accounts/check/v4-2023-04-27returned 200 through the same proxy (1.3s and 2.4s), while the banner was still displayed.websocket_reconnect_recovery_done,refreshRecentConversationsFailed=false).cloud_picker_identity accountChanged=true hasAccount=truetwo seconds later, with the renderer never restarted.So at the moment of the failure the token and the transport were both fine, and the state that had to be rebuilt lived inside the app-server process.
What I can't answer: whether an explicit
account/readissued after recovery would have returned an account. The desktop talks to app-server over its own stdio channel, so I have no way to send that RPC from outside without a patched build. The lastcloud_picker_identitysamples in my log are from 08:47:37Z and 08:47:47Z, bothhasAccount=false, and I don't have any post-recovery samples.If you can point me at a supported way to call
account/readagainst the running app-server (debug socket, env var, or a build flag), I'll run the pair you describe: outage recovery with the original process alive, then the fresh-process control.mapleleo-hub commentedon Nov 5, 2026
Correction to my previous comment, and then the numbers you asked for.
I said I could not drive
account/readfrom outside. That was wrong for a fresh process, right for the desktop's own instance.codex app-server generate-json-schema --out <dir>dumps the protocol, and the process speaks newline-delimited JSON over stdio, so a fresh instance can be driven directly. The desktop instance still cannot: it is spawned with plain stdio and no--sock, and~/.codex/app-server-control/is never created, socodex app-server proxyhas nothing to attach to.Protocol as it actually looks on
codex-cli 0.166.0-alpha.5.1:initializerequiresparams.clientInfo {name, version}.account/readtakesGetAccountParams { refreshToken?: boolean }.getAuthStatusmethod in the client request enum on this build. The account methods present areaccount/read,account/rateLimits/read,account/usage/read,account/workspaceMessages/read,account/sendAddCreditsNudgeEmail,account/login/start,account/login/cancel,account/logout,account/gatewayOAuth/read|login|cancel. My desktop log does contain inboundmethod=getAuthStatus, so either the desktop layer calls something not in the published schema or the schema lags the build.Baseline from a fresh instance on this machine, same token, same proxy, healthy network:
refreshToken:falseandrefreshToken:truereturn the same complete object. Immediately afterinitialize, before I sent any request, the server pushed:Now the measurement you asked for. I re-extracted every
account/readround trip from the desktop main-process log of the failing session, withdurationMsand RPC error code. 93 calls for the day; the relevant window:account/readbetween 08:46:56 and 09:46:38Three things fall out, and one of them corrects my earlier framing.
1. The failure is a JSON-RPC internal error, not an empty success.
I wrote earlier that the RPC answered with
errorCode=nullbut no account. That was wrong. The round trips that failed carry-32603(Internal error). TheerrorCode=nulllines I had picked up were the request-tracking records, not the responses. So the desktop did receive an error, it just receives no actionable classification:-32603covers the routing-discovery failure, the 15 s bound being exceeded, and anything else bubbling out of the account processor.2. The client stops asking and never resumes.
websocket_reconnect_recovery_startfires at 09:41:45Z andwebsocket_reconnect_recovery_done ... refreshRecentConversationsFailed=falseat 09:41:46Z. Between that and my manual kill at 09:46:36Z there are zeroaccount/readcalls. The 59-minute gap is not a sampling artifact; the client simply does not ask again after the backoff completes. Whatever had to be rebuilt lived in the desktop's identity store, and the transport-recovery event does not re-drive it.3. The 15-second bound does not match the log.
Two concurrent calls, both started around 08:46:03, returned
-32603after 42.8 s and 52.8 s. Ifread_account()were bounded at 15 s per attempt, then either the bound does not apply on this Windows desktop path, or there is a retry ladder underneath it that surfaces the last error only after several attempts. 42.8 ≈ 3 × 14.3 and 52.8 is not a clean multiple, so the ladder theory fits only loosely. Worth checking whether the bound covers the/accounts/checkrouting discovery insideread_account()and not just the account fetch.That combination explains why the banner has no retry affordance: the desktop got a classification-free internal error, backed off, and had nothing better to show than "authentication unavailable".
What to test next, now that the logs point somewhere specific:
chatgpt.comfor the app-server only, then callaccount/readfrom a driven instance and record whether it returns at 15 s or at 40–50 s. This isolates the bound from the routing discovery.account/readonwebsocket_reconnect_recovery_done. That event already fires correctly in my logs and is the natural hook; it needs no app-server change.account/updatedagain when the app-server observes its transport recover, instead of only at startup and on auth transitions.I can run (a) here on request; it needs a few minutes of deliberately black-holed egress for
chatgpt.com, which is why I have not done it unprompted. For an in-situ capture of the desktop's own app-server during a real outage, the cheapest enabler would be a build flag or env var that makes the desktop expose its control socket. With that,codex app-server proxywould let me run the full outage-recovery plus fresh-process control pair you described.