[BUG/UX] Slash command completion should prioritize command name matches over description matches

Resolved 💬 4 comments Opened Aug 12, 2025 by Helmi Closed Aug 12, 2025

When using MCP servers with custom prompts alongside built-in Claude Code commands, the slash command completion algorithm appears to use full-text search across both command names and descriptions without proper prioritization.

Expected Behavior:
When typing a slash command (e.g., /test), the completion should prioritize:

  1. Commands that start with the typed term
  2. Commands that contain the typed term anywhere in the name
  3. Commands that contain the typed term in the description

Current Behavior:
The completion algorithm seems to randomly select matches from both command names and descriptions, often showing commands where the typed term only appears in the description rather than prioritizing actual command name matches.

Screenshot:
https://d.pr/i/hSuazD

Impact:
This makes it confusing for users to find the command they're looking for, especially when multiple command sources are available (built-in commands, MCP server commands, and custom prompts).

Environment:

  • Using MCP server with custom prompts
  • Mixing built-in Claude Code commands with custom commands
  • Command completion dropdown shows mixed/unprioritized results

Note:
It would be helpful if command name matches could be given priority over description matches in the completion results.

View original on GitHub ↗

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