Desktop app: daily forced re-login (session_stale_relogin) + scheduled-task run freezes mid tool call and silently skips all subsequent runs
Environment
- Claude Desktop app (macOS), version 2.2553.1
- macOS: Darwin 25.5.0 (Apple Silicon)
- Login method: Google SSO
Bug 1: Daily forced re-login (session_stale_relogin)
Since 2026-09-18 the desktop app forces a full re-login roughly once per day. ~/Library/Logs/Claude/main.log shows the session being invalidated server-side and the OAuth layer latching the failure:
[info] [oauth-v2] short-circuiting fresh /authorize on latched session_stale_relogin for cacheKey=acct:<redacted>|<redacted>:<org-redacted>:https://api.anthropic.com:user:inference user:file_upload user:profile user:sessions:claude_code
[warn] Cannot get base query config: oauth failed (session_stale_relogin detail=<text len=80>)
[error] Cannot start session local_<redacted>: OAuthError (session_stale_relogin detail=<text len=80>)
Occurrences of session_stale_relogin per day in main.log: 2026-09-18: 14, 2026-09-19: 35, 2026-09-21: 13, 2026-09-22: 85. Each episode ends only after a manual re-login via the system browser ([Auth] Using system browser for: /login/app-google-auth, then [oauth] clearing latched session_stale_relogin failures).
Bug 2: Scheduled-task run froze mid-tool-call and silently blocked the schedule for 9 hours
An hourly scheduled task (Gmail check + forward) had a run start at 2026-09-21 18:12 UTC. It completed its main work, then froze during a Gmail MCP tool call (last activity 18:12:59 UTC, ~30 s after start) and stayed in running state for ~9 hours. While it was stuck:
- every subsequent hourly run was marked "Übersprungen" (skipped) because a run was "in progress",
- no timeout, no failure state, no notification — the freeze was only visible by manually opening the run history.
The freeze coincides with the session_stale_relogin episode above, so the likely chain is: session went stale mid-run → tool call never returned → run never terminated → scheduler skipped all following runs.
After manually stopping the stuck session, the next run started normally and succeeded.
Expected
- The app should refresh/re-establish the session without a daily manual re-login (or at least surface why the session is invalidated).
- Scheduled-task runs need a watchdog/timeout: a run with no activity for e.g. 15+ minutes should be failed (and ideally retried), not left
runningindefinitely while all subsequent runs are skipped without any user-facing alert.
🤖 Generated with Claude Code
3 Comments
Seeing the same thing on macOS, and I have a corroborating detail that may help narrow the root cause: the cookie jar comes back empty on every launch, not just the
sessionKey.Environment
2.2553.1(same as OP), embedded Claude Code2.1.275/Applications, no quarantine attributeOnset matches: 2026-09-18
[account] Login-state transition (loggedOut: true → false)appears at every launch starting Sept 18, and never before it:Each boot is preceded by:
Launches on Sept 17 and earlier came up already signed in, with no such transition.
The whole cookie jar is empty at boot, not just sessionKey
Querying
~/Library/Application Support/Claude/Cookiesafter a launch, every row was created during that launch — including cookies with multi-year expiries that should long predate it:| cookie | expires | created |
|---|---|---|
|
sessionKey| 2026-10-20 (28d out) | this launch, 09:25 ||
anthropic-device-id| 2027-07-19 | this launch, 09:24 ||
_fbp| 2027-10-27 | this launch, 09:24 |19 rows total, oldest
creation_utc= app start time. TheCookiesfile itself dates from my install in June, so it is not being deleted or recreated — it comes back empty. AndsessionKeycarries a 28-day expiry, so this is not a short-TTL policy.Worth noting this is specific to cookies:
Local Storage/leveldbdoes persist across days in the same profile, so the profile is not being wiped wholesale.The preceding quit was clean
Not a dirty-shutdown / unflushed-jar problem — the quit handler that flushes storage ran and completed:
session_stale_reloginis the same error class, and predates the daily loopI have it in my logs going back to late August, when it showed up as scope-expansion failures rather than full re-login:
So "sessionKey is valid but too old" existed well before Sept 18; what changed on Sept 18 looks like the handling of it.
Ruled out locally (in case others are chasing these)
Claude Safe Storagekeychain item, created at install, never rotated or duplicated — safeStorage decryption is not failingno-timeout, unlocked, and the default keychainconfig.json— onlyoauth:tokenCache/oauth:tokenCacheV2. There is no client-side setting to opt out of this.The open question
I can't yet tell whether the app (a) fails to persist cookies at quit, or (b) persists them fine and clears the jar at startup after the server rejects the stale session. My quit-cleanup block suggests the flush happens, which points at (b) — but a snapshot of
Cookiestaken between quit and next launch would settle it. Happy to capture that if it's useful.Same on macOS 14.8.4, Claude Desktop 2.16120.0, Google SSO. Forced re-login on launch after an overnight quit since ~Sep 27 (Sep 27, 28, 29, 30, Oct 1). main.log at each launch:
The sessionKey cookie persists locally (28-day expiry, decrypts fine, clean quits), and the server rejects it on the next launch. Earlier logs show
403 session_stale_relogin("sessionKey is valid but too old for the requested scope expansion"). Quick restarts (minutes) mostly do not trigger it.I am a paying subscriber, and the Claude Desktop app on Linux has become unusable for real work. Since late September I have been forced to sign in again over and over, at worst every 2–3 hours. Every forced logout breaks running sessions and interrupts my work. That is not an inconvenience. It is a broken product that I pay for every month.
This is not a configuration problem on my side. My logs show the server rejecting a valid session:
The app also registers with the server only as a keyless device, from the very first launch:
Logs confirm forced re-logins on Sep 27, Sep 30, Oct 4, Oct 5, Oct 10, Oct 11 and Oct 13. The GNOME keyring is running and cookie encryption works. The system clock is NTP-synced. Nothing on my machine explains this.
Environment: claude-desktop 2.9939.4 (apt), Claude Code 2.1.284, Linux 7.2.8, GNOME.
This is a known issue, and it is being ignored:
What I expect: