Skip to content

Escaping out of question/prompt mode leaves session stuck — cannot cancel with Esc or Ctrl+C #2681

@ericnewton76

Description

@ericnewton76

Describe the bug

When the agent asks a question (e.g. via a multiple-choice prompt or freeform input), pressing Escape to dismiss the question causes the interface to become unresponsive. The session continues processing in the background, but:

  • Esc no longer stops generation
  • Ctrl+C no longer interrupts
  • The only recovery is to kill the terminal or the process entirely

Steps to reproduce

  1. Start a Copilot CLI session
  2. Give a prompt that causes the agent to ask a clarifying question (multiple-choice or freeform)
  3. Press Esc to dismiss/cancel the question instead of answering it
  4. Observe: the agent continues processing but the UI no longer responds to Esc or Ctrl+C

Expected behavior

Pressing Esc during a question prompt should cleanly cancel the question and return to the normal input state, with Esc and Ctrl+C remaining functional for interrupting generation.

Environment

  • OS: Windows
  • Copilot CLI version: v1.0.24

Additional context

This may be related to the input handler not properly restoring keybinding state after the question prompt is dismissed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions