[BUG] Active session auto-archives within seconds of window focus loss (Windows)
What happened
An active Claude Code Desktop session auto-archives itself within seconds of the app losing window focus (e.g., alt-tab to a browser to look at a URL, return after ~30 s, find the session marked "This session is archived, to restart it click unarchive"). Has occurred 2+ times in the same continuous work session today.
The session was unambiguously not idle — it was mid-conversation with the assistant actively working on a multi-file feature.
Repro steps
- Start a Claude Code Desktop session in a project directory
- Have a multi-turn conversation (this happens after the session has been alive for ~hours)
- Alt-tab to another window (browser, etc.) for less than a minute
- Return to Claude Code
Expected: session is exactly where I left it.
Actual: session pane shows "This session is archived, to restart it, click unarchive."
Diagnostic info
- OS: Windows 11 Pro 26200
- Approximate time of latest occurrence: ~12:25 UTC, 2026-05-09
- Session UUID: available on request (happy to share privately with Anthropic engineering — don't want to post a session identifier in a public thread)
- Local config ruled out: no
Stop/SessionStart/ archive hooks in usersettings.json, nosettings.local.json, nokeybindings.json, no scheduled tasks. No mechanism in the user's local config callsarchive_session.
Related
Possibly the same root cause as #24534 ("Archived Code sessions not visible on Windows"), but the trigger here is much more specific — focus loss within seconds, not "vanished overnight."
Workaround
Manually click "Unarchive." Conversation state is preserved (the JSONL on disk is intact); only the UI pointer is broken.
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗