Codex Desktop repeatedly signs out on macOS while CLI and web remain authenticated
What version of the Codex App are you using (From “About Codex” dialog)?
ChatGPT Desktop bundled Codex: codex-cli 0.149.0-alpha.4.3 I also tested standalone Codex CLI versions: 0.149.1 — works normally 0.148.0 — works normally
What subscription do you have?
ChatGPT Prolite
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
What issue are you seeing?
ChatGPT/Codex Desktop on macOS repeatedly signs me out during normal use.
This issue appears to be specific to the Desktop app. ChatGPT web stays signed in and works normally, and standalone Codex CLI also remains authenticated and works normally with the same account.
Sometimes after the Desktop app signs me out, quitting and reopening the app restores the session automatically. However, the sign-out issue keeps recurring.
Relevant Desktop logs show:
Unauthorized - Access token is missing
desktop_fetch_auth_401
hadToken=false
skipRetryReason=no_token_attached
Example log entries:
status=401
errorMessage="Unauthorized - Access token is missing"
tokenSource=cached
willRetry=false
I have already tested the following:
- Reinstalled and updated ChatGPT Desktop.
- Confirmed ChatGPT web remains signed in.
- Confirmed Advanced Account Security is not enabled.
- Checked macOS Keychain; no relevant Codex credential issue was found.
- Confirmed
~/.codex/auth.jsonexists and is updated after authentication. - Reset Desktop cache/profile data.
- Tested standalone Codex CLI
0.149.1— stable. - Tested standalone Codex CLI
0.148.0— stable. - Temporarily tested the Desktop app with the
0.148.0Codex binary — Desktop still signed out. - Restored the original ChatGPT app and verified the app code signature is valid.
Current behavior:
The Desktop app eventually behaves as if no access token is attached and starts returning HTTP 401 errors, even though the same account remains authenticated in ChatGPT web and Codex CLI.
Expected behavior:
The Desktop app should remain authenticated continuously, like ChatGPT web and standalone Codex CLI.
Additional diagnostic information was uploaded via /feedback.
Uploaded thread ID:01a03cb1-2fb8-7603-8e9b-7cd01c7740ac
What steps can reproduce the bug?
Steps to reproduce
- Open the ChatGPT Desktop app on macOS.
- Enter Codex and sign in successfully.
- Start or open a Codex thread.
- Use Codex normally for a few minutes.
- The Desktop app eventually loses authentication and behaves as if the user has been signed out.
- Relevant requests then begin returning HTTP 401 errors.
- Quitting and reopening the Desktop app may restore the login session automatically, but the issue recurs again after continued use.
The issue reproduces without any specific prompt or code snippet.
It also reproduces after:
- reinstalling/updating ChatGPT Desktop
- resetting the Desktop cache/profile
- confirming
~/.codex/auth.jsonexists and is updated - testing with a different bundled Codex binary version
Control tests:
- ChatGPT web remains signed in and works normally with the same account.
- Standalone Codex CLI
0.149.1remains authenticated and works normally. - Standalone Codex CLI
0.148.0also remains authenticated and works normally.
Relevant log messages include:
Unauthorized - Access token is missing
desktop_fetch_auth_401
hadToken=false
skipRetryReason=no_token_attached
Uploaded diagnostic thread ID:
01a03cb1-2fb8-7603-8e9b-7cd01c7740ac
Session ID / token usage / context window usage:
Not applicable. The issue appears to be authentication/session related rather than prompt-length or context-window related.
What is the expected behavior?
Expected behavior
ChatGPT/Codex Desktop should remain authenticated continuously after a successful sign-in.
Using Codex normally, opening threads, or leaving the app running should not cause the Desktop app to lose its authentication state or return to the signed-out screen.
Requests from the Desktop app should continue attaching a valid access token and should not fail with HTTP 401 errors during normal use.
The Desktop authentication behavior should be consistent with ChatGPT web and standalone Codex CLI, which remain signed in and work normally with the same account.
Additional information
Additional information
A few additional observations may help with diagnosis:
- After the Desktop app signs out, quitting and reopening the app sometimes restores the session automatically without requiring me to sign in again.
- This suggests that persistent credentials may still be valid while the Desktop runtime authentication state is being lost.
~/.codex/auth.jsonremains present and is updated after authentication.- The issue persists even after resetting the Desktop cache/profile.
- The issue also persisted when I temporarily tested the Desktop app with a
0.148.0Codex binary. - Standalone Codex CLI remains stable with the same account, while the Desktop app repeatedly loses authentication.
- ChatGPT web also remains signed in throughout.
This makes the issue appear specific to the Desktop authentication/token attachment layer rather than an account-level authentication failure.
Diagnostic information was uploaded via /feedback.
Uploaded thread ID:01a03cb1-2fb8-7603-8e9b-7cd01c7740ac
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Adding a more specific occurrence from #41032 that appears to match this issue.
On macOS 26.6.2 with Desktop
26.814.41407(build 6720), this reproduced repeatedly while several long-running tasks/tool operations were active. The credential remained valid (codex login statusstill reportedLogged in using ChatGPT), and relaunch immediately restored the same account.The immediate transition in two incidents was not an expired credential: the desktop timed out waiting for the live local app-server's
getAuthStatusresponse, then treated that transport timeout as an absent account:<details>
<summary>Sanitized transition</summary>
Incidents:
2026-08-27 02:33:57Zand02:35:52Z.</details>
The app-server was still processing task/tool events around the timeout, and after restart the renderer received completions for an
unknown conversation. This suggests the desktop may be misclassifying a temporarily unresponsive/broken app-server RPC path as logout, while background work survives. A useful fix invariant may be: retry/reconnectgetAuthStatuswithout clearing the last known authenticated account, then reconcile active task ownership.Additional Windows evidence: auth-status timeouts and an unresponsive sign-in screen
Sharing an additional Windows occurrence for triage alongside the getAuthStatus timeout evidence already collected in this issue from #41032. The diagnostic signature overlaps, but a shared root cause has not been confirmed.
Environment: Windows 25H2, OS build 26200.9168; desktop app package version 26.820.9563.0. Incident date: 27 August 2026.
While already signed in and using the desktop app, it suddenly switches to the "Sign in to ChatGPT" screen. Clicking "Continue login" has no visible effect and does not open a browser. Ending all ChatGPT.exe processes and reopening the app temporarily restores the existing signed-in state. The problem recurs. Opening an ordinary HTTPS link through Windows launches Chrome normally.
The user also reports that the app has become progressively slower and less stable, including hangs/crashes, after recent upgrades. This is a suspected regression, not a proven version-specific cause. The exact last known good version has not been identified.
Verified diagnostic sequence:
Representative diagnostic text:
Other local RPCs still succeed during these authentication failures. For example, configRequirements/read completes in 4 ms at 19:47:04 / 11:47:04Z, and config/read completes in 11 ms at 19:56:31 / 11:56:31Z. This does not look like a complete loss of the local backend connection.
The account-settings endpoint also produces repeated 401 responses with hadToken=true, tokenSource=cached and willRetry=true. Such a 401 also occurs after a successful restart, so it alone does not establish the cause. The evidence does not confirm a deadlock, revoked credentials, a token-refresh failure, or a backend process exit. The sign-in button's internal failure path remains unverified.
Please investigate authentication RPC hangs/timeouts, why Continue login becomes unresponsive, and graceful recovery without requiring users to terminate processes. A temporary authentication-read failure should provide a useful error/retry path instead of leaving the app stuck on an unusable sign-in screen.
Observed reproduction sequence
This repeatedly interrupts normal work and significantly degrades the user experience.
Privacy
Only the sanitized technical summary is included. No raw logs, chat transcripts, account identifiers, billing information, local filesystem paths, device identifiers, or credentials are attached.
This is currently making the MacOS app unusable for me. I get kicked out in the middle of tasks running. Sometimes multiple occurences within the span of 5 minutes.
Adding an independent macOS occurrence with a release comparison and a more specific upstream trigger.
Environment
26.820.60940(build7119)0.150.0-alpha.8Regression window
Sparkle installed build 7119 on 2026-08-26 at 13:03 China Standard Time, replacing build 6662 / bundled
0.148.0-alpha.9. The first matching 401 appeared 38 minutes later. In the available Aug 20–25 logs (before this update), there were zero cached-token 401s, token-retrieval failures,getAuthStatustimeouts, or failed account lookups.Observed failure chain on build 7119
hadToken=true,tokenSource=cached, andwillRetry=true.Must use workspace account for this operation; six end asFailed to refresh authentication token.Failed to retrieve authentication token.getAuthStatustimes out 13 times. Account lookup then reportsaccount_info_token_unavailablefive times andaccount_ordering_emptyonce.Inspecting the shipped Electron bundle shows a 30-second
getAuthStatustimeout. ThefetchAuthTokenerror path invalidates the in-memory token cache on an exception; the local fetch handler converts token acquisition failure to status 432; the renderer then treats the unavailable token as no authenticated account and enters onboarding. This appears to turn a workspace/account-selection business 401 or a transient auth-RPC timeout into a false logout.Negative and trigger evidence
Trust evaluate failure: [leaf TemporalValidity]. Wake/network restoration may trigger the path, but it does not explain every incident.Build 7226 comparison
The staged
26.820.71523/ build7226cannot currently be considered a fix. A read-only reconstruction of its signed delta still bundles0.150.0-alpha.8; the CLI bytes before the Mach-O signature are identical, and the ElectrongetAuthStatus, token-cache, force-refresh, and principal-parsing paths are semantically unchanged.Suggested fix invariants: do not treat
workspace account requiredas token expiry; do not clear the last known authenticated account on a transport timeout; retry/reconnect the auth RPC before routing to onboarding._Privacy: this comment contains only a sanitized technical summary. No raw logs, account identifiers, tokens, cookies, session transcripts, device identifiers, or local paths are attached._
Another affected macOS user is seeing the same recurring sign-out behavior in ChatGPT/Codex Desktop.
Environment observed in the sanitized desktop log:
0.149.0-alpha.4.1At startup, the local app-server initializes successfully and changes from
connectingtoconnected. Account lookup also succeeds initially:Despite the healthy initial authentication state, the desktop app repeatedly returns the user to a disconnected/signed-out state during use.
A separate stale Git lock was also observed under
.codex/vendor_imports/skills/.git/index.lock, but process inspection confirmed there was no active Git command. This appears related only to recommended-skills refresh and does not explain the recurring authentication loss.The currently captured filtered log covers startup and does not yet include the exact failure window. No raw logs, account identifiers, tokens, email addresses, conversation identifiers, or private filesystem paths are included here.