[FEATURE] Add a neutral/no-op first option to AskUserQuestion to prevent accidental selection
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When Claude Code asks a question via AskUserQuestion with multiple-choice options, the first option is pre-selected. If I accidentally press Enter at the wrong moment (e.g., finishing a previous command, or simply a mistimed keypress), it immediately selects that first option without any way to undo it.
This can lead to unintended choices being made, which may cause Claude to take an unwanted path — potentially writing wrong code, choosing the wrong approach, or making decisions I didn't intend. Recovering from this requires manually correcting course, which wastes time and context.
Proposed Solution
Add a setting (e.g., "questionSafetyOption": true) that inserts a neutral, no-op first option at the top of every AskUserQuestion prompt. This option would do nothing when selected, effectively acting as a guard against accidental Enter presses.
For example, the no-op option could be labeled something like:
- "(No selection — ask me again)"
- "(Skip — re-ask this question)"
When selected, Claude would simply re-ask the same question or treat it as if no answer was given.
Alternative Solutions
- Requiring a confirmation step after selecting an option (e.g., "You selected X. Confirm? [Y/n]") — but this adds friction to every interaction, not just accidental ones.
- Adding a short delay before accepting input on question prompts — but this would slow down intentional fast responses.
- No current workaround exists — once Enter is pressed, the choice is made and there's no undo.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
- Claude is working on a task and asks me to choose between approaches (e.g., "Which pattern should I use?")
- I'm still reading the options or finishing typing in another terminal pane
- I accidentally hit Enter
- The first option gets selected without my intent
- Claude proceeds with that choice, potentially going down the wrong path
- With this feature, the no-op first option would catch the accidental press, and Claude would simply re-ask the question
Additional Context
This is similar to how some CLI tools and installers place a "Cancel" or neutral option first in selection lists to prevent accidental confirmation. It's a small UX safeguard that would prevent frustrating mistakes during interactive sessions.
The setting should be opt-in so it doesn't change the default behavior for users who prefer the current flow.
Related Issues
- #21212 — "Enter Safety" toggle to prevent accidental prompt submission (addresses accidental Enter on the main prompt input, not on question dialogs)
- #25787 — Decouple prompt suggestion acceptance from execution (addresses accidental Enter on prompt suggestions)
This request targets a different surface: the multiple-choice question dialogs where a pre-selected option gets immediately confirmed by an accidental keypress.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗