[BUG] Single-character slash commands broken in autocomplete
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→/dcommand should be selected in autocomplete - Type
/g→/gcommand should be selected in autocomplete
### Actual Behavior
- Type
/→/ais selected (first command alphabetically) - Type
/d→ Selection remains on/a(does not change) - Type
/g→ Selection remains on/a(does not change) - The autocomplete list shows
/dand/g, but they cannot be selected
### Exceptions
/kand/mwork 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:
- Use the workaround (add character then delete)
- Rename all single-character commands to multi-character names
- Manually type the full command without autocomplete
### Requested Actions
- Fix the autocomplete matching logic for single-character commands
- 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→/dcommand should be selected in autocomplete - Type
/g→/gcommand should be selected in autocomplete
### Actual Behavior
- Type
/→/ais selected (first command alphabetically) - Type
/d→ Selection remains on/a(does not change) - Type
/g→ Selection remains on/a(does not change) - The autocomplete list shows
/dand/g, but they cannot be selected
### Exceptions
/kand/mwork 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:
- Use the workaround (add character then delete)
- Rename all single-character commands to multi-character names
- Manually type the full command without autocomplete
### Requested Actions
- Fix the autocomplete matching logic for single-character commands
- 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→/dcommand should be selected in autocomplete - Type
/g→/gcommand should be selected in autocomplete
### Actual Behavior
- Type
/→/ais selected (first command alphabetically) - Type
/d→ Selection remains on/a(does not change) - Type
/g→ Selection remains on/a(does not change) - The autocomplete list shows
/dand/g, but they cannot be selected
### Exceptions
/kand/mwork 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:
- Use the workaround (add character then delete)
- Rename all single-character commands to multi-character names
- Manually type the full command without autocomplete
### Requested Actions
- Fix the autocomplete matching logic for single-character commands
- 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_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗