[BUG] Desktop auto-archive kills ACTIVELY RUNNING sessions — in-flight background subagents terminated without warning or resume

Open 💬 2 comments Opened Jul 8, 2026 by digitalgrove-bit

Environment

  • Claude Code 2.1.204, Claude Desktop app
  • macOS 26.3 (build 25D125), Apple Silicon

Summary

When the desktop app auto-archives a session, it kills the session's running Claude Code process and every background subagent (Agent tool tasks) that process owns — even when the session is mid-task with live background work. There is no warning, no grace period, and killed background agents have no resume path: their in-process state is simply gone.

This is distinct from #58446 (sessions auto-archiving on a timer) and #59235 (request for an opt-out toggle): those describe when archive fires; this report is about what archive does to a live process. Even if the archive timing heuristics were perfect, archiving should never hard-kill active work.

Impact (one real day, 2026-07-07)

Running a multi-session parallel workflow (one orchestrating session + several worker sessions) on one project directory, we hit this ~8 times in a single day. Each occurrence terminated in-flight background Agent tasks:

  • A long-running scoring agent, killed twice (once overnight after its watcher died, once mid-scoring)
  • Two independent bug-fix agents, each killed mid-build before their first commit
  • A database seeding agent and an eval-probe agent, killed mid-run
  • The most recent occurrence killed a code-fix subagent that had produced analysis but committed nothing — total loss, full restart required

Repro (as best we can tell)

  1. macOS desktop app, a project with several concurrent sessions (some long-lived)
  2. Leave a session working — main loop active or background Agent tasks running
  3. Within roughly 30–90 minutes, the app auto-archives one of the sessions
  4. The archived session's process and all its child/background agents are SIGKILLed; background task notifications report the agent as stopped; no resume is offered

We have not found a reliable trigger; it correlates with having many sessions open on one project directory (similar bucket-scoped observation to #58446).

Expected

  • A session with a running process or live background tasks is never eligible for auto-archive; or
  • Archive of an active session requires explicit confirmation; or at minimum
  • Archive gracefully drains: background agents get a checkpoint/park signal and a resume path instead of a hard kill

Workaround we adopted (works, but costly)

Standing instruction in every background-agent prompt: "commit+push after every green phase — host restarts kill in-process state." That caps the blast radius at one phase of work, but burns tokens re-establishing context on every relaunch and shouldn't be necessary.

🤖 Filed with Claude Code on behalf of the user

View original on GitHub ↗

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