Background subagents keep running after user orders stop; task notifications re-trigger post-stop work

Resolved 💬 2 comments Opened Jun 11, 2026 by tobyjohnkoenig Closed Jun 14, 2026

Summary

Background subagents launched with the Agent tool (run_in_background: true) kept executing on the user's machine after the user repeatedly and explicitly ordered the agent to stop. Each background-task completion notification also re-invoked the main agent, which resumed taking actions (merges, cleanup) after the stop order. The user had to escalate through roughly six increasingly urgent "STOP" messages (and threatened a reboot) before the model finally enumerated and TaskStop-killed the remaining subagent.

Environment

  • Claude Code VS Code extension, Windows 11 (10.0.26200)
  • Model: claude-fable-5[1m]
  • 10 concurrent background subagents (general-purpose, gh/git workloads in local repos)

What happened

  1. Main session spawned 10 background subagents to open PRs across an org.
  2. User sent "closeout already", then "last warning - we lose in 30 secs", then repeated "STOP" messages.
  3. The model ended its turns, but: (a) every <task-notification> from a completing subagent re-invoked the model, which treated it as license to do one more action; (b) the still-running subagents continued doing git/file operations inside a repo the user had open in VS Code, so from the user's perspective the agent visibly kept working no matter how many times they said stop.
  4. Only after several stop messages did the model realize that stopping required calling TaskStop on the live subagent.

Expected behavior / requests

  • A user interrupt or a clear stop message should halt or suspend background tasks, not just the foreground turn — or at minimum there should be an obvious user-facing kill-all (e.g. Esc also stops background agents, or a /stop-all command).
  • After a user message arrives, queued/incoming task notifications should not auto-resume agent action until the user message has been addressed. Notifications currently arrive with an instruction to address the user's message after completing the current task, but the model can and did keep chaining actions across multiple notifications.
  • Consider surfacing running background tasks more prominently in the VS Code UI so users can see (and kill) what is still executing.

Impact

User lost control of their machine's agent activity for several minutes despite explicit, repeated stop orders. This is a trust/safety issue for autonomous multi-agent use.

View original on GitHub ↗

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