Esc interrupt kills all background agents and marks them permanently unresumable

Open 💬 0 comments Opened Jul 12, 2026 by garshythoel

During a long interactive session, any keyboard interrupt (Esc) of the main turn also terminates every running background agent (spawned via the Agent tool / Workflow tool). Worse, those agents get flagged "stopped by the user and won't be resumed," so subsequent SendMessage resume attempts are refused — even though the user only meant to interject in the main conversation, not cancel background work.

The only recovery is spawning a fresh agent and manually mining the dead agent's JSONL transcript for partial work.

Expected behavior: interrupting the foreground turn should leave background tasks running (or at minimum leave them resumable). Killing background agents should require an explicit TaskStop or an explicit user request.

Impact: five research/build agents were silently killed across one session (three separate interrupts), each requiring a relaunch with duplicated token spend. It also creates a confusing UX: the user sees 'no bg tasks' with no indication their interrupt was the cause.

Environment: Claude Code desktop app, macOS (darwin 25.5.0), model claude-fable-5. Agents spawned via Agent tool (run_in_background default) and Workflow tool; interrupts were plain Esc presses on the main conversation while agents ran.

🤖 Filed by Claude Code on behalf of the user

View original on GitHub ↗