[Windows] User-level ~/.claude/commands/ only loads the first .md file
Resolved 💬 3 comments Opened Feb 6, 2026 by swc00057 Closed Feb 9, 2026
Bug Description
On Windows, custom slash commands placed in the user-level ~/.claude/commands/ directory only load the first valid .md file (sorted alphabetically). All other command files are silently ignored.
Project-level .claude/commands/ works correctly and loads all files.
Environment
- Claude Code version: 2.1.34
- OS: Windows 10
- Shell: bash (Git Bash)
- Note: The same command files work correctly on Linux
Steps to Reproduce
- Place multiple
.mdfiles in~/.claude/commands/:
````
~/.claude/commands/
├── analyze.md
├── build.md
├── debug.md
├── expert.md
└── test.md
- Start Claude Code
- Type
/and observe autocomplete — onlyanalyzeappears (first alphabetically) - Try
/build→Unknown skill: build - Try
/test→Unknown skill: test
Verification
- Renamed
analyze.md→_analyze.md(underscore prefix, gets skipped) - Result:
build.mdbecame the only recognized skill (next valid file alphabetically) - Files starting with
_are ignored entirely - Restored original filename →
analyzeis recognized again, others still ignored - Subdirectory
commands/sc/also affected —/sc:buildreturnsUnknown skill
Summary Table
| Scope | Behavior |
|-------|----------|
| User-level ~/.claude/commands/ | Only 1st .md file loaded (BUG) |
| Project-level .claude/commands/ | All files loaded correctly |
| Subdirectory commands/sc/ (user-level) | Not loaded at all |
| Linux (same files) | All files loaded correctly |
Additional Details
- All files have identical encoding (UTF-8), line endings (LF), permissions (readable), no BOM
claude doctorshows no related warnings- File format (with or without YAML frontmatter) does not affect the issue
- Copying a file to project-level
.claude/commands/makes it immediately recognized
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗