Skip to content

ask_user form: pressing Esc silently discards the entire form instead of clearing current input #4943

Description

@zbrownell

Describe the bug
When answering an agent-presented form (via the ask_user/elicitation tool), pressing Esc closes/cancels the whole form. Everywhere else in the CLI, Esc clears the current text input (per /help: "esc esc - clear input, interrupt, stop agents, or rewind"). This inconsistency makes it very easy to accidentally lose an entire in-progress form response when the user's intent was just to clear/edit the current field.

Expected behavior
Esc inside a form field should clear that field's current text (consistent with normal prompt behavior), not close/cancel the form. A separate, distinct key/action should be used to actually cancel the form.

Additional context
This came up in a real session: the user had already answered one question in a multi-field form, hit Esc intending to clear/edit text, and the entire form closed with no indication of what (if anything) was preserved. The agent had no way to tell whether the cancellation was intentional or not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions