[Enhancement] Confirmation dialog: inconsistent number key mapping (2 = no vs 2 = accept all)
Current Behavior
When a confirmation/permission dialog appears in Claude Code, the numbered key shortcuts change meaning depending on how many options are available:
- 2-option dialog (yes/no):
1= yes,2= no - - 3-option dialog (yes/yes-all/no):
1= yes,2= yes and accept all,3= no
Problem
The 2 key maps to "no" in some dialogs and "yes and accept all" in others. This inconsistency causes:
- Accidental rejections muscle memory says "press 2 for the second option" but the meaning silently changed
- 2. Accidental "accept all" user intends to reject but hits
2expecting "no" and instead grants blanket permission
This has caused real-world frustration, with unintended permission grants and denials happening regularly.
Proposed Solution
Use a consistent mapping where the reject option is always the same key regardless of option count:
| Key | Action |
|-----|--------|
| 1 | Yes |
| 2 | Yes and accept all (when available) |
| 0 | No (always reject) |
This way 0 always means "no" and the meaning of 1 and 2 never changes.
Alternative: Make it configurable
The numbered option keys (1, 2, 3) appear to be hardcoded in the select/list UI component and are not exposed through the keybinding system. The existing confirm:yes and confirm:no actions in keybindings.json only cover y/n/Enter/Escape not the positional number keys. Exposing these as configurable keybindings (e.g., confirm:option1, confirm:option2, confirm:option3) would also solve this.
Environment
- Claude Code on Windows
- - Issue is consistent across all versions tested
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗