[BUG] Slash command autocomplete highlights wrong item - second match selected instead of first

Resolved 💬 4 comments Opened Jan 18, 2026 by unthingable Closed Jan 21, 2026

Description

When typing a slash command that has multiple matches, the autocomplete menu highlights the second item instead of the first, causing the wrong command to be selected when pressing Enter.

Steps to Reproduce

  1. Type /status in the input
  2. Autocomplete shows list with /status first, /statusline second
  3. Observe that /statusline (second item) appears highlighted instead of /status
  4. Press Enter

Expected Behavior

/status (the first and exact match) should be highlighted and selected.

Actual Behavior

/statusline (second item) is highlighted and selected despite /status being first in the list.

Environment

  • Claude Code version: 2.1.12
  • OS: macOS Darwin 24.6.0

Screenshot

Screenshot showing the autocomplete menu with /status typed, where /status is listed first but /statusline (second item) is highlighted:

!autocomplete-wrong-highlight

(Note: Screenshot available from reporter showing the issue)

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗