AskUserQuestion prompt is discarded by a single Esc keypress — easy to lose the question by accident

Open 💬 0 comments Opened Jun 25, 2026 by ryofukutani

Summary

When the agent presents an AskUserQuestion interactive prompt, pressing Esc once immediately dismisses the entire question and sends a rejection back to the agent. A single reflexive keystroke discards the question before it can be answered, and the only recovery is to ask the agent to re-present it (which isn't always faithful).

Steps to reproduce

  1. The agent calls AskUserQuestion (a multiple-choice prompt appears).
  2. Press Esc once.
  3. The prompt is dismissed and the tool call is rejected.

Why this is a problem

  • The question usually marks a decision point the agent is blocked on; losing it derails the turn.
  • Esc is commonly used to cancel/clear input, so accidental dismissal is easy.
  • A single keystroke is a very low bar for a destructive (question-discarding) action; there is no confirmation or undo.

Suggested improvements (any one would help)

  • Require a confirmation or a double-Esc to discard the question.
  • Treat the first Esc as "collapse/skip for now" while keeping the question answerable/restorable.
  • Show a brief "Question dismissed — press <key> to restore" affordance.
  • Separate "close the picker UI" from "reject the tool call": Esc could just close the UI without sending a rejection to the agent.

Environment

  • Claude Code (CLI), terminal.

View original on GitHub ↗