[BUG] Command selector highlights wrong command when filtering by partial name
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 using the / command selector to search for commands, typing a partial command name does not filter correctly. Specifically, when typing /model to find and run the /model command, the selector incorrectly keeps /modern-git highlighted instead of filtering to show /model as the active selection.
<img width="824" height="662" alt="Image" src="https://github.com/user-attachments/assets/d953e643-2234-4ab2-9b9a-4e28d305756f" />
The command selector appears to have a fuzzy matching or focus update issue where it matches commands containing the typed characters but fails to update the highlighted/active selection properly. This makes it impossible to select the intended command when multiple commands share partial name similarities.
What Should Happen?
The command selector should:
- Filter the command list to show only commands matching the search term
- Highlight the first matching result
- Update the highlight when the search is refined further
- Allow selection of the correct filtered command
Error Messages/Logs
No error messages shown, but the UI behavior is incorrect - the highlighting remains on /modern-git when the search text is /model.
Steps to Reproduce
- Open Claude Code (any project/directory)
- Press
/to open the command selector - Type
model(so the full input is/model) - Observe: The selector still shows
/modern-gitas highlighted instead of/model - Expected:
/modelshould be highlighted as it matches the search term
Claude Model
Latest available (currently using Haiku 4.5)
Is this a regression?
Unknown - unclear if this worked in previous versions
Claude Code Version
Claude Code v2.1.12
Platform
GitHub CLI / Git workflow commands
Operating System
Windows
Terminal/Shell
Windows Terminal / PowerShell
Additional Information
This is a UI/UX issue with the command selector's filtering and focus logic. The bug manifests when:
- Multiple commands share similar prefixes (e.g.,
/modeland/modern-git) - User types a partial search that matches multiple commands
- The fuzzy search or highlighting system fails to properly prioritize the exact match
Screenshot: See attached - shows /model typed in the input but /modern-git remains highlighted below.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗