Claude Code cannot detect new commands or deleted commands
Steps to produce the issue
- Open Claude Code in a terminal
- Add a new command to
~/.claude/commands/mycommand.md - Enter
/. Claude Code doesn't suggest the new command
<img width="507" height="308" alt="Image" src="https://github.com/user-attachments/assets/feadcb49-c088-42d8-a184-594753312800" />
- Now,
/exitthen open Claude Code again. New command is detected.
<img width="458" height="102" alt="Image" src="https://github.com/user-attachments/assets/52d22cf4-20aa-4b59-b038-899bb4ffbcd9" />
- Now, delete the file
mycommand.md. Claude Code still suggests the deleted command.
<img width="458" height="102" alt="Image" src="https://github.com/user-attachments/assets/52d22cf4-20aa-4b59-b038-899bb4ffbcd9" />
Expectation
Option 1: Claude Code should detect new/deleted commands automatically.
Option 2: Provide a way to tell Claude Code to refresh/reindex to detect new/deleted commands.
Additional
I am not sure if this is also the issue for other files. For example, if we copy and delete files directly in agents directory without using /agents. In this case, please also fix it.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗