[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

  1. Place multiple .md files in ~/.claude/commands/:

``
~/.claude/commands/
├── analyze.md
├── build.md
├── debug.md
├── expert.md
└── test.md
``

  1. Start Claude Code
  2. Type / and observe autocomplete — only analyze appears (first alphabetically)
  3. Try /buildUnknown skill: build
  4. Try /testUnknown skill: test

Verification

  • Renamed analyze.md_analyze.md (underscore prefix, gets skipped)
  • Result: build.md became the only recognized skill (next valid file alphabetically)
  • Files starting with _ are ignored entirely
  • Restored original filename → analyze is recognized again, others still ignored
  • Subdirectory commands/sc/ also affected — /sc:build returns Unknown 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 doctor shows 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

View original on GitHub ↗

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