Feature Request: Kill switch for runaway Task agents
Problem
When a Task agent gets stuck in an infinite loop or becomes redundant, there's no way to terminate it. The KillShell tool only works for bash tasks, not agents.
Impact
A stuck agent burned 16+ million tokens (~$30+) doing redundant work while I watched helplessly. The only option was to kill the entire claude process, losing session context.
Reproduction
- Spawn multiple Task agents in parallel
- Agents get stuck (e.g., reading same files repeatedly, running git status in loops)
- Try to kill them - no tool available
- Watch tokens burn
Proposed Solution
Add a KillAgent or KillTask tool that can terminate any task type by ID, not just bash shells.
Current Workaround
None. You have to kill the parent claude process (Ctrl+C), losing your entire session context.
Context
Occurred during browser-mcp stability fixes. Spawned parallel dev agents for 5 streams. Implemented fixes directly while agents churned uselessly on already-merged work. No way to stop them.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗