You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On macOS, opening/resuming an existing thread signs the app out. The desktop auth poller attempts an OAuth refresh, receives 401 refresh_token_invalidated, and the UI drops to signed-out. Logging out, having auth.json removed, and signing in fresh does not fix it — a brand-new token family is invalidated within ~76 seconds.
The distinguishing detail: the rotated refresh token is never written to auth.json. After a fresh sign-in, auth.json mtime and last_refresh never advance, so the client keeps presenting a refresh token the server has already retired.
Environment
App
ChatGPT.app 26.818.41705 (CFBundleVersion 6971), bundle id com.openai.codex
Confirm no ChatGPT/codex processes remain and ~/.codex/auth.json is gone.
Relaunch, sign in. A new token family is written.
Open any existing thread.
Signed out.
Evidence
Fresh sign-in, then failure 76 seconds later:
14:39:01 sign-in; auth.json written; id_token iat 14:39:01, exp 15:39:01
14:40:17 ERROR codex_login::auth::manager
Failed to refresh token: 401 Unauthorized
{
"error": {
"message": "Your refresh token has been invalidated. Please try signing in again.",
"type": "invalid_request_error",
"code": "refresh_token_invalidated"
}
}
After that failure, ~/.codex/auth.json still holds the same refresh token written at sign-in, and last_refresh is unchanged at the sign-in timestamp. Nothing was persisted.
Every invalidation is attributed to the desktop auth poller — rpc.method="getAuthStatus" with rpc.request_id=desktop-auth:<uuid>:
caller count
desktop-auth 12
other callers 0
Several fire in the same second as thread/resume, which is the user-visible trigger.
Error attribution by client version across full log history (token_invalidated):
bundled core 0.14x 668
desktop shell 26.818 12
Onset correlates exactly with the update. The previous desktop build (26.727.51351) last logged at 20:24:51; the new build's first log is 20:25:01, and the first refresh_token_invalidated is 20:49:05 the same evening.
Notably still working
The iOS remote client (codex_chatgpt_ios_remote) has zero auth errors in the entire log history, and successfully performed a thread/resume while the desktop was failing. Its requests ride the long-lived access_token (10-day expiry) rather than driving the hourly id_token refresh. This isolates the fault to the desktop shell's auth-refresh path rather than the account, the credentials, or the backend.
Summary
On macOS, opening/resuming an existing thread signs the app out. The desktop auth poller attempts an OAuth refresh, receives
401 refresh_token_invalidated, and the UI drops to signed-out. Logging out, havingauth.jsonremoved, and signing in fresh does not fix it — a brand-new token family is invalidated within ~76 seconds.The distinguishing detail: the rotated refresh token is never written to
auth.json. After a fresh sign-in,auth.jsonmtime andlast_refreshnever advance, so the client keeps presenting a refresh token the server has already retired.Environment
26.818.41705(CFBundleVersion 6971), bundle idcom.openai.codexcodex-cli 0.149.0-alpha.4.1(Contents/Resources/codex)26.819.11345(node v24.19.0, python 3.12.13), archarm64chatgpt(ChatGPT sign-in, not API key)Reproduction
ChatGPT/codexprocesses remain and~/.codex/auth.jsonis gone.Evidence
Fresh sign-in, then failure 76 seconds later:
After that failure,
~/.codex/auth.jsonstill holds the same refresh token written at sign-in, andlast_refreshis unchanged at the sign-in timestamp. Nothing was persisted.Every invalidation is attributed to the desktop auth poller —
rpc.method="getAuthStatus"withrpc.request_id=desktop-auth:<uuid>:Several fire in the same second as
thread/resume, which is the user-visible trigger.Error attribution by client version across full log history (
token_invalidated):Onset correlates exactly with the update. The previous desktop build (
26.727.51351) last logged at20:24:51; the new build's first log is20:25:01, and the firstrefresh_token_invalidatedis20:49:05the same evening.Notably still working
The iOS remote client (
codex_chatgpt_ios_remote) has zero auth errors in the entire log history, and successfully performed athread/resumewhile the desktop was failing. Its requests ride the long-livedaccess_token(10-day expiry) rather than driving the hourlyid_tokenrefresh. This isolates the fault to the desktop shell's auth-refresh path rather than the account, the credentials, or the backend.Ruled out locally
/backend-api/accounts/*/settingsrequests and zero "Must use workspace account" messages in logs.arm64-only on Apple silicon, no translation involved.auth.jsonis writable, nouchg/schgflags, 173 GB free; writes succeed at sign-in and simply never happen again.arm64.desktop-auth.Expected
A
401on refresh should not drop a session whoseaccess_tokenis still valid, and a successful refresh should persist the rotated token toauth.json.Related
auth.jsonWorkaround
None on the desktop. Driving Codex from the iOS remote client continues to work.