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
- Start Claude Code
- Type
/change(intending to complete to/changelog) - Press Tab
- Expected: Completes to
/changelog - Actual: Completes to
/commit
Issue 2: Command entry gets swapped after previous command
- Successfully run
/changelog(had to type it out manually due to Issue 1) - Type
/commitand press Enter - Expected: Runs
/commitcommand - Actual: Runs
/changelogcommand 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:
- Wrong command being selected during tab completion
- Previous command being re-executed instead of the newly typed command
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗