claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Commands duplicated in command list

Open warpdev opened this issue 10 months ago • 3 comments

Environment

  • Platform (select one):
    • [ ] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [x] Other: Claude MAX Plan
  • Claude CLI version: 1.0.25 (Claude Code)
  • Operating System: macOS 15.5
  • Terminal: Terminal App

Bug Description

Custom commands are being duplicated in the UI. This appears to occur when commands with the same name exist in different scopes. The duplication happens each time I navigate through commands using the keyboard arrow keys. Commands in the duplicated area behave as if they are in an unselectable region and cannot be selected.

Steps to Reproduce

  1. Create same commands at different scopes. ( ~/.claude/commands/foo-bar.md, ~/**/project/.claude/commands/foo-bar.md)
  2. Open claude at terminal, type /.
  3. Focus the commands using arrow up, down keys.

Expected Behavior

The command list area should not display any unselectable regions, and even if there are commands with the same name, only the actual number of commands should be displayed on the screen.

Actual Behavior

Whenever commands with the same name are focused, the command is duplicated and displayed in the unselectable area of the UI.

Additional Context

Image

warpdev avatar Jun 17 '25 01:06 warpdev

Also exists when there is a clash between native and user commands, like /login. (I'm on Linux)

RomainGehrig avatar Jun 17 '25 06:06 RomainGehrig

This is intended behavior. Please give your commands unique names. I suppose we could warn when there is a clash

wolffiex avatar Jun 18 '25 00:06 wolffiex

I'll have to disagree: the commands were unique when the full scope was used, ie. /login (anthropic) vs /project:puppeteer:login. That was also the point of organizing them in subdirectories.

I'd prefer to type the full scope when the command is ambiguous than having to make sure no command name ever clash between Claude Code <> user <> project. Also for Anthropic: do you want to potentially break someone workflow anytime you introduce a new command?

RomainGehrig avatar Jun 18 '25 05:06 RomainGehrig

I saw the namespacing was restored in 1.0.45: • Custom slash commands: Restored namespacing in command names based on subdirectories. For example, .claude/commands/frontend/component.md is now /frontend:component, not /component.

Thanks for that! I guess we can close the issue @warpdev?

RomainGehrig avatar Jul 24 '25 06:07 RomainGehrig

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 31 '25 14:08 github-actions[bot]