Escape to close /btw response view kills the focused background agent

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 28, 2026

Summary

Pressing Escape to dismiss the /btw response view kills the running background agent the view was focused on. Escape is also the only apparent way to close that view, so checking on a background agent's status reliably terminates it.

Environment

  • Claude Code v2.1.220 (CLI, terminal)
  • Windows 11 Home 10.0.26200
  • Git Bash / PowerShell host terminal

Steps to reproduce

  1. Have the main conversation launch a background agent (Agent tool with run_in_background) — in my case a long-running general-purpose subagent.
  2. While it runs, navigate to the agent and ask its status with the /btw command.
  3. The agent answers in the /btw window/overlay.
  4. Press Escape to close the window (no other close affordance is offered).

Expected

Escape dismisses the /btw view and returns to the main conversation; the background agent keeps running.

Actual

The background agent is killed. The main conversation receives a task notification with status: killed / "was stopped by user". No confirmation prompt is shown before the kill.

Impact

Lost two long-running Opus agents mid-task (each several minutes in, doing multi-file work) just by checking their status. The kill is silent from the user's perspective — it looks like the overlay simply closed.

Suggested fix

Either dismiss the overlay on Escape without propagating a kill to the focused agent, or add an explicit close key/affordance distinct from Escape, or prompt for confirmation before killing a running agent from that view.

View original on GitHub ↗