Autocomplete ignores prefix match and defaults to wrong command

Resolved 💬 3 comments Opened Jan 17, 2026 by LadderChaos Closed Jan 21, 2026

Bug Description

The slash command autocomplete menu ignores typed prefix and defaults to /preflight instead of matching the typed command.

Steps to Reproduce

  1. Type /context in the prompt
  2. Autocomplete menu shows /context as the first option
  3. Press Enter
  4. Actual: /preflight executes instead
  5. Also broken: Type /con and press Tab → completes to /preflight instead of /context

Expected Behavior

  • Typing /context + Enter should execute /context (the displayed first option)
  • Typing /con + Tab should complete to /context (prefix match)
  • Autocomplete should respect lexical prefix matching, not some arbitrary default

Current Workaround

  • Type /context then press Down arrow to manually select it, then Enter
  • Or type the full command with a trailing space: /context to bypass autocomplete

Environment

  • Claude Code CLI
  • macOS (visible in screenshot path: /var/folders/...)
  • Observed: 2026-01-17

Screenshot

User provided screenshot showing /context typed and displayed as first option, but /preflight being the actual selected/default command.

Impact

Medium - Confusing UX, breaks expected autocomplete behavior, forces manual selection for non-default commands.

View original on GitHub ↗

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