[BUG] Pressing numeric key in option interface executes currently selected option, not option associated with number
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When shown a list of options 1, 2, 3 in Claude Code CLI, with option 1 highlighted, pressing numeric key "2" executes the currently-highlighted option, not option 2. See screengrab:
<img width="1481" height="409" alt="Image" src="https://github.com/user-attachments/assets/0a38de38-ae1f-46ad-9906-8fe26a77cffc" />
A session took a very, very long time because Claude kept asking me for permission to execute very similar sed commands. I continually selected "Yes, and don't ask again for similar commands in [path to repo]" by pressing the "2" key, but each time it performed a single action and then asked me for permission again. This happened hundreds of times with similar commands.
What Should Happen?
When you press the numeric key associated with an option, that option should be executed.
Error Messages/Logs
Steps to Reproduce
- Run Claude and ask it to perform a task which involves carrying out a similar function (like a
sed-based command) on many files. - On editing each file with a similar command, Claude will prompt if you would like to proceed with:
- Yes <= THIS OPTION WILL BE HIGHLIGHTED
- Yes, and don't ask again for similar commands in [path to repo]
- No
- Press numeric key 2
- Claude will execute the command it asked for permission to do
- Almost immediately, Claude will ask permission again for the very similar command to be run on the next file in the list.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.116 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗