[BUG] Custom slash commands not discovered in v2.1.2 (macOS)
Resolved 💬 3 comments Opened Jan 9, 2026 by aerivox Closed Jan 13, 2026
Description
Custom slash commands in .claude/commands/ directory are not being discovered or loaded in Claude Code v2.1.2 on macOS. Commands that were working earlier in the same session stopped working after updating to the latest version.
Environment
- Claude Code version: 2.1.2
- OS: macOS (Darwin 25.2.0)
- Shell: zsh
Steps to Reproduce
- Create
.claude/commands/test-cmd.mdwith valid frontmatter:
---
description: A test command to verify slash commands work
---
Say "Hello, the test command works!"
- Start Claude Code
- Type
/test-cmd - Observe error:
Unknown slash command: test-cmd
Expected Behavior
- Commands should appear in autocomplete when typing
/ - Commands should execute when invoked with
/command-name
Actual Behavior
- Commands do NOT appear in autocomplete
- Typing
/test-cmdreturns:Unknown slash command: test-cmd - The Skill tool also returns:
Unknown skill: test-cmd - Commands were working earlier today before the update
File Verification
Files are correctly formatted:
- ASCII text encoding
- Unix line endings (LF)
- Valid YAML frontmatter
- Correct directory structure:
.claude/commands/*.md
$ file .claude/commands/*.md
.claude/commands/commit-push-pr.md: ASCII text
.claude/commands/test-cmd.md: ASCII text
$ ls -la .claude/commands/
total 16
drwxr-xr-x@ 4 user staff 128 Jan 9 21:27 .
drwxr-xr-x@ 7 user staff 224 Jan 9 21:24 ..
-rw-r--r--@ 1 user staff 819 Jan 9 21:21 commit-push-pr.md
-rw-r--r--@ 1 user staff 104 Jan 9 21:27 test-cmd.md
Related Issues
- #9518 - Claude Code does not detect slash commands
- #9926 - Slash Commands Not Loading (v2.0.22)
- #10294 - Slash commands not loading (v2.0.27)
- #12693 - Custom slash commands not executable via /command syntax (v2.x regression)
- #13906 - Project-Specific Slash Commands Not Loading (macOS)
Additional Context
- Commands work on Arch Linux with the same setup
- Global commands directory (
~/.claude/commands/) is empty - The workaround mentioned in #12693 (asking Claude to "run the /command") does NOT work - the Skill tool also fails to find the command
This appears to be a regression where the commands directory is not being scanned at all.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗