Feature Request: Kill switch for runaway Task agents

Resolved 💬 7 comments Opened Dec 15, 2025 by kosmotaur Closed Feb 14, 2026

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

  1. Spawn multiple Task agents in parallel
  2. Agents get stuck (e.g., reading same files repeatedly, running git status in loops)
  3. Try to kill them - no tool available
  4. 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.

View original on GitHub ↗

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