Bug: ESC in /btw overlay propagates to underlying option dialog

Resolved 💬 1 comment Opened Jul 7, 2026 by idantene Closed Jul 7, 2026

Bug

When /btw is open at the same time as an agent option/permission dialog, pressing ESC to close the /btw overlay also cancels the underlying dialog. The keypress propagates through both layers.

Additionally, while the /btw input window is open, the option dialog beneath it is not visible, so the user cannot see what they are about to accidentally cancel.

Steps to reproduce

  1. Trigger any option or permission dialog (e.g. a tool permission prompt, or an AskUserQuestion dialog).
  2. While the dialog is waiting for input, type /btw to open the background-context overlay.
  3. Press ESC to dismiss the /btw window.
  4. The underlying dialog is also dismissed/cancelled without any explicit user action on it.

Expected behaviour

ESC should close only the /btw overlay. The underlying dialog should remain visible and unaffected, with focus returning to it.

Environment

  • Platform: macOS
  • TUI mode: fullscreen

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗