[BUG] Slash commands not loading in version 2.0.27 - "Unknown slash command" error
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug Report:
## Environment
- Claude Code Version: 2.0.27
- Platform: Linux (WSL2)
- OS Version: Linux 6.6.87.1-microsoft-standard-WSL2
- Commands Directory:
/home/jrg/.claude/commands/
## Description
Slash commands are not being discovered or registered by Claude Code. Commands exist in the
correct directory with proper frontmatter formatting, but invoking them results in "Unknown slash
command" errors.
Additional Context
- This appears to be a regression - slash commands worked in previous versions
- The SlashCommand tool exists and is available, but command discovery/registration is failing
- Commands are never listed in available commands
- No errors shown during startup about command loading failures
Impact
Users cannot utilize custom slash commands, forcing manual copy-paste of command templates or
workarounds using MCP servers/plugins instead.
What Should Happen?
## Expected Behavior
The slash commands should be recognized and executed, expanding the prompt content from the
markdown files.
## Actual Behavior
Error returned:
Error: Unknown slash command: wrap-up
Error Messages/Logs
## Evidence
Commands exist and are properly formatted:
$ ls -la ~/.claude/commands/
total 24
drwxr-xr-x 2 jrg jrg 4096 Oct 5 09:00 .
drwxr-xr-x 13 jrg jrg 4096 Oct 24 21:55 ..
-rw-r--r-- 1 jrg jrg 6306 Oct 5 09:00 audit.md
-rw-r--r-- 1 jrg jrg 5186 Oct 5 09:00 wrap-up.md
Example command frontmatter from wrap-up.md:
---
description: "Generate comprehensive project wrap-up documentation with findings, decisions, and
next steps"
argument-hint: "[optional: specific focus like 'findings', 'technical', 'decisions',
'next-steps']"
---
Steps to Reproduce
## Steps to Reproduce
- Create slash command files in
~/.claude/commands/:
audit.mdwith proper frontmatter (description, argument-hint)wrap-up.mdwith proper frontmatter
- Start Claude Code
- Attempt to invoke command with
/wrap-upor/audit
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.27
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
This happens intermittently that it stops working - perhaps with new versions - not necessarily new with this version
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Second that I started seeing this on v2.0.27. I use project commands and they are no longer loading in new sessions. I cleared ~/.claude/projects as well to no effect.
Environment Info
I found the same issue on v2.0.28. Symlinked commands and agents are not working anymore.
To confirm it is related to symlinks, I created a simple echo.md command like:
If I have this in
.claude/commands, I can call/echo, if I create a subfoldertand copy it there, I can call/t:echobut if I symlink it as echolink incommandsor in the subfolder, none of the expected calls work (and this symlinking strategy used to work for me until yesterday, probably before some autoupdate)Maybe this could be related to this CVE: CVE-2025-59829: Claude Code permission deny bypass through symlink
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
If you happen to have ripgrep configured globally to include color, perhaps try removing that (see more details here)
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.