ESC key kills ALL background tasks/subagents - poor UX for parallel workflows

Status Open
Maintainer reply None cached
Activity 7 comments · opened Jan 27, 2026

Problem

When pressing ESC, it kills all running background tasks and subagents at once. This is problematic for workflows that involve multiple parallel agents.

Current behavior

  • User starts multiple background tasks (e.g., 3 ally agents running in parallel)
  • User accidentally presses ESC
  • All 3 agents are killed immediately

Expected behavior

Either:

  1. ESC should only cancel the current foreground operation, not background tasks
  2. Or show a confirmation dialog: "You have 3 running tasks. Kill all? [y/N]"
  3. Or provide a way to selectively stop tasks (e.g., /tasks stop <id>)

Use case

I frequently run multiple ally agents in parallel for research/review tasks. One accidental ESC destroys all progress.

View original on GitHub ↗

7 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/17505
  2. https://github.com/anthropics/claude-code/issues/13996
  3. https://github.com/anthropics/claude-code/issues/19490

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

teren-papercutlabs · 7 months ago

did some testing, this breaks in 2.1.16. in 2.1.15 the behaviour is fine.

this is very critical to my workflow but there are things in latest versions i want to try too, please have this get fixed soon

teren-papercutlabs · 7 months ago

@ashwin-ant any chance you can look at this? i don't think this is intended

gentoosys · 6 months ago

+1. it is critical and make claude code unusable!!!

machu-esc · 6 months ago

same here esc not working

JanChec · 1 month ago

This is especially problematic if the main chat starts doing something wrong/pointless - ESC and the square stop button stops everything.

ryanstout · 1 month ago

please fix, this is very frustrating. The claude app is the only app that works this way. Years of muscle memory means I accidentally kill all sub-agents many times per day. A CTRL+Enter to interrupt might fix it, since thats what I reach for and the ESC is the 2nd thing.