Slash command tab completion selects wrong command and swaps subsequent commands

Resolved 💬 3 comments Opened Jan 20, 2026 by rosepark4861 Closed Jan 20, 2026

Slash command tab completion selects wrong command and swaps subsequent commands

Description

Slash command tab completion is selecting wrong commands. When typing a partial command and pressing Tab, it completes to a different command than expected. Additionally, after completing one command, subsequent command entries execute a different (previously used) command instead.

Environment

  • Claude Code Version: 2.1.12
  • Platform: Linux (Ubuntu)

Reproduction Steps

Issue 1: Tab completion selects wrong command

  1. Start Claude Code
  2. Type /change (intending to complete to /changelog)
  3. Press Tab
  4. Expected: Completes to /changelog
  5. Actual: Completes to /commit

Issue 2: Command entry gets swapped after previous command

  1. Successfully run /changelog (had to type it out manually due to Issue 1)
  2. Type /commit and press Enter
  3. Expected: Runs /commit command
  4. Actual: Runs /changelog command instead

This behavior repeated twice - each time typing /commit resulted in /changelog being executed.

Expected Behavior

  • Tab completion should complete to the command that matches the typed prefix
  • Typing a command and pressing Enter should execute that exact command

Actual Behavior

  • Tab completion completes to an unrelated command
  • Previously executed commands "persist" and override newly typed commands

Workaround

Type out the full command manually without using tab completion. However, even this doesn't fully work due to the command swapping issue.

Impact

  • Cannot reliably use slash commands
  • Tab completion is unusable
  • Commands execute the wrong action
  • Significant workflow disruption

Possible Cause

The command completion/selection logic appears to have state that persists incorrectly, causing:

  1. Wrong command being selected during tab completion
  2. Previous command being re-executed instead of the newly typed command

View original on GitHub ↗

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