[BUG] Linux Desktop: session_stale_relogin (elevated_auth) forces ~daily re-login; sign-in demanded twice during Cowork folder-access grants
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Linux desktop app forces a full interactive re-login roughly daily, even when the app is never closed. When a Cowork session requests local folder access, the app demands sign-in TWICE within minutes (elevated auth step-up, first sign-in apparently swallowed by a login-callback race - see logs).
Log evidence shows server-side session invalidation (reason=elevated_auth, auth_kind=session_stale_relogin, from=logout), not local credential loss.
Ruled out locally (verified):
- gnome-keyring-daemon running with secrets component
- Local State os_crypt: {'portal': {'prev_desktop': 'ubuntu:GNOME', 'prev_init_success': True}} (cookie encryption healthy)
- No [safeStorage] warnings in logs (encryption available, no plaintext fallback)
- Clock NTP-synced, RTC matches UTC exactly
- Stock .desktop launcher, no Chromium flags
- Browser sessions on the same machine persist for weeks; only the desktop app is affected
- Reproduced on 1.32352.1 and 1.34493.1
What Should Happen?
- Desktop session renews silently, like browser sessions, instead of being invalidated as stale ~daily.
- If elevated auth is required for device/folder operations, ONE step-up sign-in should satisfy it; the callback race forcing a second sign-in is a client bug.
- A "trust this device" option or substantially longer freshness window for personal (non-enterprise) accounts on their own desktop.
Error Messages/Logs
Forced logout redirect (from ~/.config/Claude/logs/main.log, ids redacted):
https://claude.ai/login?returnTo=%2Fcowork%2F<session_id>%3Freason%3Delevated_auth%26auth_kind%3Dsession_stale_relogin%26org_uuid%3D<org_uuid>&reauth=1&from=logout
Client race during the resulting sign-in:
claudeURLHandler: login loadURL superseded (teardown race)
claudeURLHandler: ignoring repeat delivery of login callback
Steps to Reproduce
- Install claude-desktop 1.34493.1 (.deb) on Ubuntu; sign in with a personal Max account (email code or magic link).
- Leave the app running >24h.
- Observe forced sign-out with auth_kind=session_stale_relogin in the login URL.
- Alternatively: in a Cowork session, request folder access to the local machine; observe an elevated_auth re-login prompt, and after completing sign-in, a second prompt within minutes.
Claude Model
_No response_
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
claude-desktop 1.34493.1 (official apt .deb); Electron 42.9.2
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Desktop app bug (not CLI); personal Max subscription, no SSO. Related: #80494 (Linux desktop re-login each session), #82721 (~24h forced re-auth in desktop local sessions, macOS/Okta variant). Full unredacted logs available on request.
5 Comments
Confirming this on a different distro and with a different trigger. Same
from=logoutserver-side redirects, plus a client-side error and a secondauth_kindvalue that aren't in the original report.Environment
| | |
|---|---|
| OS | Linux Mint 22.3 (Ubuntu 24.04 base), Cinnamon 6.6.9, X11 |
| App | claude-desktop 1.37937.3 (official apt build) |
| Account | Personal Max, no SSO |
| Devices | Same account signed in on several devices; Chat and Cowork used elsewhere too |
Trigger differs from the original report
The app does not need to stay running >24h. Reproduction here:
Step 5 is where it fails. The failure fires on the first prompt sent, not at app launch. It affects any conversation, including a brand-new one outside any project with a trivial "ok" prompt. Model-independent (reproduced on Haiku and Fable).
Re-authenticating clears it immediately, until the next long idle period.
Client-side error (not in the original report)
~/.config/Claude/logs/claude.ai-web.loglogs exactly one new line at the moment of failure:The user-facing dialog reads: "Sign in to continue — Your session has expired. Sign in again to verify your identity."
That wording is misleading and costly. It sends users down an authentication-debugging path — keyring, OAuth, token storage — that has nothing to do with the actual failure. A 403 is not an expired credential. Worth fixing the error mapping independently of the session bug itself.
Second
auth_kindvalue:untrusted_devicemain.logshows two distinct variants (UUIDs redacted):session_stale_reloginmatches the original report.untrusted_deviceappears to be new here — and unexpected on a personal Max account with no SSO and no org device policy.In both cases
returnTotargets a Cowork project (/cowork/project/<id>), with adifferent project id in each of the two lines — note this differs from the original
report's
/cowork/<session_id>path. Consistent with thestartRemoteCoworkSessionfailure above.
Unexplained: one conversation stayed functional
While every other conversation failed, one already-open conversation kept working normally — prompts sent and answered — for the entire duration. It survived two full app restarts (
killall+ relaunch) and an app update, and still worked.I have no explanation for this and can't reconcile it with a purely session-level invalidation. Flagging it in case it narrows down which state is actually being invalidated.
Ruled out locally
In addition to the original report's list:
loginkeyring is unlocked normally via PAMChromium Safe Storagepresent in the persistentloginkeyring (checked viasecret-tooland seahorse)~/.config/Claude/—Cookies,Preferences,Network Persistent Stateall written on recent activityANTHROPIC_*/CLAUDE_*environment variables set (checked inenv,~/.profile,~/.bashrc,/etc/environment)killall+ relaunchNote
DevTools are disabled in the production build (Ctrl+Shift+I opens an incognito chat, F12 does nothing), so I couldn't capture the response body of the failing 403. Happy to provide it if there's a supported way to enable remote debugging.
Confirming this on Windows 11, on the same app build as the comment above — so it is not Linux-specific.
Environment
| | |
|---|---|
| OS | Windows 11 x64 |
| App | Claude Desktop 1.37937.3 (Electron 42.10.0, Node 24.18.1) |
| Account | Personal, no SSO, no Enterprise/Console organization |
| Browser | Chrome on the same machine, same account |
Same symptom
The desktop app demands a full interactive re-login roughly once a day. Throughout, claude.ai in Chrome on the same machine stays signed in with no interruption — the account session is alive and only the desktop app's auth is being invalidated. That matches the "browser sessions on the same machine persist for weeks; only the desktop app is affected" observation in the original report.
Independent evidence that this is not local credential loss
Ending every Claude process in Task Manager and relaunching the app immediately restores the session with no login prompt, so stored credentials do survive a full restart. That rules out a wiped credential store, a DPAPI/safeStorage failure, or a cleanup tool clearing the app data folder — and is consistent with the server-side
auth_kind=session_stale_reloginredirect captured in the original report rather than anything happening on disk.Also ruled out: an administrative session-length policy. This is a personal account with no Enterprise or Console organization, and that control is admin-only and can only shorten sessions.
Not yet verified on my side
I have not pulled
%APPDATA%\Claude\logs\main.logto confirm that the samereason=elevated_auth&auth_kind=session_stale_relogin&from=logoutredirect appears on Windows. Happy to add that if it would help.Suggest widening the
platform:linuxlabel.Windows 11 log evidence, following up on my comment above. Same server-side path as the Linux reports. Account, org and request IDs redacted.
Correction to my previous comment: this is not an MSIX/Store build. The standard Windows installer writes its logs to
C:\Users\<user>\AppData\Local\Claude\Logs\main.log— LocalAppData, not Roaming. The%APPDATA%\Claudepath I referenced does not exist on Windows.The rejection, including the response body
The previous comment notes that DevTools are disabled in the production build, so the body of the failing response couldn't be captured there. On Windows it is written to
main.login full — above.The forced logout redirect, identical to the original report
This line repeats at least 16 times within the same failure. The search that produced this excerpt was capped at 20 matches, so the true count may be higher.
What one line appears to pin down
The session key is not expired — it is stated to still be valid. It is refused only for a scope expansion to elevated access, and the app's reaction to that refusal is a full
from=logoutteardown rather than a scoped re-auth of just the elevated request.That would account for the browser-versus-app asymmetry several of us have reported: a browser session on the same machine never requests the scope expansion, so it never trips the freshness check and persists indefinitely, while the desktop app trips it on a roughly daily cadence and logs the whole session out.
If that reading is right there are two separable defects here: a freshness window on elevated-scope grants that is far shorter than the session lifetime, and the absence of graceful degradation when that grant is refused.
Description
The desktop app repeatedly prompts me to re-authenticate via Google (system browser opens /login/app-google-auth) roughly once per day, sometimes more, even though the underlying API OAuth token is still valid and cached correctly.
Environment
kwalletd pre-flight: has-wallet)Evidence from main.log
Expected behavior
Similar to other desktop AI clients (e.g. ChatGPT Desktop), the session should persist across app restarts without requiring a fresh Google login every day.
Question
Is there a way to mark this device as trusted persistently, or is this session lifetime intentional/configurable?
Correcting my earlier comment. On Windows,
session_stale_reloginis not the daily signature — it appears exactly twice in my logs, both on 2026-08-21, with no recurrence in the eight days since, across a continuous 9-day log (main.log, 2026-08-21 07:55:18 → 2026-08-29 17:20:09, no rotation).The daily marker is the teardown race, not the stale-session rejection
claudeURLHandler: login loadURL superseded (teardown race)— 8 occurrences over those 9 days:Intervals between consecutive events: 51h47, 21h11, 22h59, 25h56, 22h51, 21h52, 33h49. Five consecutive intervals sit in the 21–26h band. The two outliers span days I did not open the app.
The wall-clock times drift across a ten-hour range (07:11 to 17:00) because the expiry does not surface when it occurs — it surfaces on first use afterward. That matches the "the failure fires on the first prompt sent, not at app launch" observation above, with a ~24h window rather than ~8h.
What this rules out
[oauth] using cached tokenreads over the same period, plus 534 token lookups, with no lookup failures. The cache atconfig.jsonloads cleanly on every start.On the
elevated_authrejection I posted earlierIt is real and the log excerpt stands, but at two occurrences on a single day it is a separate and much rarer event, not the daily cause. Apologies for conflating the two — the earlier comment overstated the connection.