[BUG] Escape during parallel subagents kills ALL agents — should prompt instead

Resolved 💬 2 comments Opened Mar 12, 2026 by bradfeld Closed Apr 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When multiple subagents are running in parallel (e.g., dispatched via the Agent tool in a single message for code review), pressing Escape kills all running agents simultaneously. There is no way to:

  1. Check on a stalled agent without destroying it
  2. Cancel one agent while keeping others running
  3. Distinguish "agent is stalled" from "agent is still working"

This interacts badly with #25068 (agent goes to sleep during long actions) and #25979 (API stream stalls with no timeout). When agents appear to stall, the natural user response is to press Escape to investigate — which destroys all in-progress work.

Previous report: #2148 covered this same behavior but was auto-closed due to inactivity. The bug still exists.

Steps to Reproduce

  1. Dispatch 2+ parallel agents via the Agent tool in a single message (e.g., code-reviewer + ui-consistency-reviewer)
  2. Wait for agents to start working
  3. Press Escape

Expected Behavior

Escape should present a menu:

Parallel agents running (2 active):
  1. code-reviewer (in progress)
  2. ui-consistency-reviewer (in progress)

What would you like to do?
  [1] Cancel agent 1
  [2] Cancel agent 2
  [A] Cancel all agents
  [R] Resume (do nothing)

Or at minimum: Escape should only cancel the most recently displayed agent, not all of them.

Actual Behavior

All parallel agents are immediately terminated. Any partially completed work is lost. The parent agent then reports that tool calls were "rejected" or "failed."

Workaround

Instead of pressing Escape, type a message (e.g., "are you still working?"). This wakes stalled agents (#25068) without killing them. But this workaround is not discoverable — users naturally reach for Escape.

Claude Code Version

2.1.72

Platform

Anthropic (first-party API, Max plan)

Operating System

macOS (Darwin 25.1.0)

Terminal/Shell

iTerm2 / zsh

View original on GitHub ↗

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