[BUG] Active session auto-archives within seconds of window focus loss (Windows)

Resolved 💬 10 comments Opened May 9, 2026 by eddyafram Closed Jun 13, 2026

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

  1. Start a Claude Code Desktop session in a project directory
  2. Have a multi-turn conversation (this happens after the session has been alive for ~hours)
  3. Alt-tab to another window (browser, etc.) for less than a minute
  4. 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 user settings.json, no settings.local.json, no keybindings.json, no scheduled tasks. No mechanism in the user's local config calls archive_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.

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗