[BUG] Single-character slash commands broken in autocomplete

Resolved 💬 2 comments Opened Nov 3, 2025 by mizumati802 Closed Nov 5, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

---
Title:
Single-character slash commands broken in autocomplete (v2.0.31
regression)

Description:
## Bug Report

### Summary
Claude Code v2.0.31 has a critical regression bug where single-character
slash commands cannot be selected via autocomplete.

### Expected Behavior

  • Type /d/d command should be selected in autocomplete
  • Type /g/g command should be selected in autocomplete

### Actual Behavior

  • Type //a is selected (first command alphabetically)
  • Type /dSelection remains on /a (does not change)
  • Type /gSelection remains on /a (does not change)
  • The autocomplete list shows /d and /g, but they cannot be selected

### Exceptions

  • /k and /m work correctly for unknown reasons
  • Two-character commands work fine (e.g., /db)

### Workaround
Type /da then delete the a character - this correctly selects /d

### Version Information

  • Claude Code Version: 2.0.31
  • Platform: macOS Darwin 24.4.0
  • Installation Method: Native

### Regression Confirmation
This functionality worked correctly in previous versions of Claude Code.

### Impact
This breaks the usability of custom single-character slash commands,
forcing users to:

  1. Use the workaround (add character then delete)
  2. Rename all single-character commands to multi-character names
  3. Manually type the full command without autocomplete

### Requested Actions

  1. Fix the autocomplete matching logic for single-character commands
  2. Add a setting to disable autocomplete entirely (as a fallback option)

### Command Files
Custom slash commands located in ~/.claude/commands/:

  • /a - archive command (frontmatter present)
  • /d - database_app command (frontmatter present)
  • /g - git_apps command (frontmatter present)
  • /k - authentication command (works correctly, frontmatter present,

also exists in project-local)

  • /m - memory command (works correctly, no frontmatter)

All commands with frontmatter use this structure:
```yaml
---
allowed-tools: Bash
description: "Command description"

What Should Happen?

---
Title:
Single-character slash commands broken in autocomplete (v2.0.31
regression)

Description:
## Bug Report

### Summary
Claude Code v2.0.31 has a critical regression bug where single-character
slash commands cannot be selected via autocomplete.

### Expected Behavior

  • Type /d/d command should be selected in autocomplete
  • Type /g/g command should be selected in autocomplete

### Actual Behavior

  • Type //a is selected (first command alphabetically)
  • Type /dSelection remains on /a (does not change)
  • Type /gSelection remains on /a (does not change)
  • The autocomplete list shows /d and /g, but they cannot be selected

### Exceptions

  • /k and /m work correctly for unknown reasons
  • Two-character commands work fine (e.g., /db)

### Workaround
Type /da then delete the a character - this correctly selects /d

### Version Information

  • Claude Code Version: 2.0.31
  • Platform: macOS Darwin 24.4.0
  • Installation Method: Native

### Regression Confirmation
This functionality worked correctly in previous versions of Claude Code.

### Impact
This breaks the usability of custom single-character slash commands,
forcing users to:

  1. Use the workaround (add character then delete)
  2. Rename all single-character commands to multi-character names
  3. Manually type the full command without autocomplete

### Requested Actions

  1. Fix the autocomplete matching logic for single-character commands
  2. Add a setting to disable autocomplete entirely (as a fallback option)

### Command Files
Custom slash commands located in ~/.claude/commands/:

  • /a - archive command (frontmatter present)
  • /d - database_app command (frontmatter present)
  • /g - git_apps command (frontmatter present)
  • /k - authentication command (works correctly, frontmatter present,

also exists in project-local)

  • /m - memory command (works correctly, no frontmatter)

All commands with frontmatter use this structure:
```yaml
---
allowed-tools: Bash
description: "Command description"

Error Messages/Logs

Steps to Reproduce

---
Title:
Single-character slash commands broken in autocomplete (v2.0.31
regression)

Description:
## Bug Report

### Summary
Claude Code v2.0.31 has a critical regression bug where single-character
slash commands cannot be selected via autocomplete.

### Expected Behavior

  • Type /d/d command should be selected in autocomplete
  • Type /g/g command should be selected in autocomplete

### Actual Behavior

  • Type //a is selected (first command alphabetically)
  • Type /dSelection remains on /a (does not change)
  • Type /gSelection remains on /a (does not change)
  • The autocomplete list shows /d and /g, but they cannot be selected

### Exceptions

  • /k and /m work correctly for unknown reasons
  • Two-character commands work fine (e.g., /db)

### Workaround
Type /da then delete the a character - this correctly selects /d

### Version Information

  • Claude Code Version: 2.0.31
  • Platform: macOS Darwin 24.4.0
  • Installation Method: Native

### Regression Confirmation
This functionality worked correctly in previous versions of Claude Code.

### Impact
This breaks the usability of custom single-character slash commands,
forcing users to:

  1. Use the workaround (add character then delete)
  2. Rename all single-character commands to multi-character names
  3. Manually type the full command without autocomplete

### Requested Actions

  1. Fix the autocomplete matching logic for single-character commands
  2. Add a setting to disable autocomplete entirely (as a fallback option)

### Command Files
Custom slash commands located in ~/.claude/commands/:

  • /a - archive command (frontmatter present)
  • /d - database_app command (frontmatter present)
  • /g - git_apps command (frontmatter present)
  • /k - authentication command (works correctly, frontmatter present,

also exists in project-local)

  • /m - memory command (works correctly, no frontmatter)

All commands with frontmatter use this structure:
```yaml
---
allowed-tools: Bash
description: "Command description"

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

  • Claude Code Version: 2.0.31

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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