Slash command autocomplete highlights wrong item that doesn't match search query

Open 💬 2 comments Opened Jan 13, 2026 by MagicTurtle-s

Description

When typing a slash command in the CLI, the autocomplete dropdown highlights the wrong item. The highlighted item doesn't match the search query.

Steps to Reproduce

  1. Start Claude Code CLI
  2. Type /resu (partial match for /resume)
  3. Observe the autocomplete dropdown

Expected Behavior

  • The dropdown should highlight /resume since it matches the search query "resu"
  • Or only show filtered results that match the query

Actual Behavior

  • /o365 is highlighted at the top even though it contains none of the characters from "resu"
  • The highlighting appears to default to the first item in the unfiltered list rather than the first matching item

Screenshot

!autocomplete-bug

Environment

  • Claude Code v2.1.5
  • Opus 4.5
  • Windows

Additional Context

The filtering logic may be working (various commands are shown), but the selection/highlight logic seems to be operating on the original unfiltered list index rather than the filtered results.

View original on GitHub ↗

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