[BUG] Pressing "Esc" in a subgents's /btw call also cancels the subagent itself
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?
Whenever you have Claude code in the terminal spawning subagents and you move your focus into a subagent via inspecting its session, the moment you type /btw and get an answer, it says "Esc" for exiting the /btw call. But the moment you press esc, not only is the /btw call exited, which is the intended behavior. But also the subagent itself is interrupted. That means you have to enter "continue" in its chat. And also the parent session is noticing this, so here's a bug.
What Should Happen?
Only the /btw call should be cancelled.
Error Messages/Logs
Steps to Reproduce
- Ask Claude code "Research the 3rd millenlial Problem and see if you can find a solution. Use many subagents each should do an in-depth research"
- Wait until at least one subagent was spawned
- Move into that subagent's session via "Arrow Down" then "Enter"
- Use the chat to enter "/btw what did we already found out?"
- Wait for the
/btwcall answer - Press "Esc" on the keyboard
You subagent is cancelled now - bug!
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.295
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
This bug really hits me 1-2 times a day. Not something random, I really need this bug to be fixed. I wonder why I am the only one using this crucial feature.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗