You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Custom command in ~/.claude/commands/ not recognized #41243
I have searched existing issues and this hasn't been reported yet
This is a single bug report (please file separate reports for different bugs)
I am using the latest version of Claude Code
What's Wrong?
Custom slash commands placed in ~/.claude/commands/ no longer appear
after updating to Claude Code 2.1.88. They were working prior to the update.
What Should Happen?
Custom slash commands in ~/.claude/commands should be available.
Error Messages/Logs
Steps to Reproduce
Create a command file: ~/.claude/commands/test.md
Run /test — command does not appear in autocomplete or execute
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.87
Claude Code Version
2.1.88
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
No response
Reacted by William Lima, Raj Siva-Rajah, Howard Nguyen, Nicholas Moen, Martin Ambrus, Tatsu001, David K, Sujin Jo, spartan-khoadtran, Christopher Bowal and 2 more
Not sure if this applies for others but my commands and agents weren't working as well. Started looking into rolling back the version. Then I thought about the 'claude has switched to a native installer use claude install' message I had been ignoring. Tried claude install, it did its thing and when I started a new session the commands and agents were working again. Hope this helps someone else.
Reacted by ghao-luminate, Joe Parker, armspkt, Mathunterix, Masataka Tabata and Naoto Setta
I'm using Claude via the Windows 11 Desktop app. After the last update commands no longer work. I've been using things like /btw yesterday just fine. Also I have no %USERPROFILE%/.claude/commands folder but I'm honestly not sure if there ever has been one (but I guess so since I could use commands beforehand jsut fine).
Claude for Windows Version: Version 1.1.9669
Not sure if this applies for others but my commands and agents weren't working as well. Started looking into rolling back the version. Then I thought about the 'claude has switched to a native installer use claude install' message I had been ignoring. Tried claude install, it did its thing and when I started a new session the commands and agents were working again. Hope this helps someone else.
Thanks @jamesnagle for the fix — claude install re-linking resolves this for CLI users. Summary for anyone landing here:
Platform
Fix
CLI (npm/native)
Run claude install to re-register the native installer. Restart your terminal afterward.
Windows Desktop app
This appears to be a separate regression in v1.1.9669 (@Elia31's case). The Desktop app manages its own command discovery path. If %USERPROFILE%\.claude\commands\ doesn't exist, try creating it manually and placing your .md command files there, then restart the app.
If claude install doesn't work:
which claude
claude --version
ls -la ~/.claude/commands/
claude /help # Should list your custom commands
The root cause seems to be that v2.1.88's migration to the native installer changed how command paths are resolved. Running claude install re-establishes the correct symlinks.
When rg can't execute, the spawn fails with EACCES. The error handler in e44() catches this and returns an empty array []. The outer try/catch in voz() silently swallows the error — so custom commands simply vanish with no error message.
Skills (loaded via Node.js readdir() + readFile()) are unaffected since they don't depend on ripgrep.
claude install likely re-extracts or re-links the binary with correct permissions as a side effect, which is why it resolves the issue for some users.
Diagnosis
# Check if rg has execute permission:
ls -la "$(npm root -g)/@anthropic-ai/claude-code/vendor/ripgrep/"*/rg
# Test if rg can actually run:"$(npm root -g)/@anthropic-ai/claude-code/vendor/ripgrep/"*/rg --version
# Test command scanning:"$(npm root -g)/@anthropic-ai/claude-code/vendor/ripgrep/"*/rg --files --glob "*.md"~/.claude/commands/
Suggestion for Anthropic
The post-install script (YK4()) handles codesign and quarantine removal but doesn't ensure the execute bit. Adding chmod +x to the install/update pipeline would prevent this regression.
Great root cause analysis @luke-timon — the 644 permission on the vendored rg binary explains everything. My earlier comment incorrectly attributed this to path resolution; the execute-bit issue is the actual culprit.
For anyone landing here:
Root cause
Vendored rg binary shipped with 644 (no execute bit) in v2.1.88
Why it breaks
Claude Code discovers custom commands via rg --files --glob "*.md" — if rg can't execute, no commands are found
CLI fix
claude install (re-registers the native installer, restores permissions)
Windows Desktop
Separate regression in v1.1.9669 — Desktop app manages its own command discovery path
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.
Activity
yurukusa commentedon Mar 31, 2026
/tmp/gh-comment-41243.md
github-actions commentedon Mar 31, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
TacoTakumi commentedon Mar 31, 2026
I can make them come back by using 2.1.87, go away again with 2.1.88.
willguitaradmfar commentedon Mar 31, 2026
I'm starting to experience exactly the same issue right now, specifically after upgrading to v2.1.88.
Context
What I’m seeing
Environment
Notes
Ahacad commentedon Mar 31, 2026
Same, updated to v2.1.88, no longer recognizing ~/.claude/commands folder, shows
unknow skillsjamesnagle commentedon Mar 31, 2026
Not sure if this applies for others but my commands and agents weren't working as well. Started looking into rolling back the version. Then I thought about the 'claude has switched to a native installer use claude install' message I had been ignoring. Tried
claude install, it did its thing and when I started a new session the commands and agents were working again. Hope this helps someone else.Elia31 commentedon Mar 31, 2026
I'm using Claude via the Windows 11 Desktop app. After the last update commands no longer work. I've been using things like /btw yesterday just fine. Also I have no %USERPROFILE%/.claude/commands folder but I'm honestly not sure if there ever has been one (but I guess so since I could use commands beforehand jsut fine).
Claude for Windows Version: Version 1.1.9669
ghao-luminate commentedon Mar 31, 2026
this worked for me
yurukusa commentedon Mar 31, 2026
Thanks @jamesnagle for the fix —
claude installre-linking resolves this for CLI users.Summary for anyone landing here:
claude installto re-register the native installer. Restart your terminal afterward.%USERPROFILE%\.claude\commands\doesn't exist, try creating it manually and placing your.mdcommand files there, then restart the app.claude installdoesn't work:The root cause seems to be that v2.1.88's migration to the native installer changed how command paths are resolved. Running
claude installre-establishes the correct symlinks.jwallaceparker commentedon Mar 31, 2026
Thanks @jamesnagle
claude installfixed this for me.luke-timon commentedon Mar 31, 2026
Root Cause: vendored ripgrep binary missing execute permission
I debugged this extensively and found the actual root cause — it's not a path resolution issue but a file permission issue on the bundled
rgbinary.How commands are loaded
Claude Code loads custom commands via its vendored ripgrep:
What went wrong in v2.1.88
The vendored ripgrep binary was installed with
644(no execute bit):$ ls -la /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg -rw-r--r-- ... rg # ← missing execute permissionWhen
rgcan't execute, the spawn fails withEACCES. The error handler ine44()catches this and returns an empty array[]. The outertry/catchinvoz()silently swallows the error — so custom commands simply vanish with no error message.Skills (loaded via Node.js
readdir()+readFile()) are unaffected since they don't depend on ripgrep.Fix
For Linux users, the path is typically:
chmod +x /usr/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/x64-linux/rg # or wherever `npm root -g` points toGeneral command to find and fix it:
Why
claude installalso worksclaude installlikely re-extracts or re-links the binary with correct permissions as a side effect, which is why it resolves the issue for some users.Diagnosis
Suggestion for Anthropic
The post-install script (
YK4()) handles codesign and quarantine removal but doesn't ensure the execute bit. Addingchmod +xto the install/update pipeline would prevent this regression.yurukusa commentedon Mar 31, 2026
Great root cause analysis @luke-timon — the
644permission on the vendoredrgbinary explains everything. My earlier comment incorrectly attributed this to path resolution; the execute-bit issue is the actual culprit.For anyone landing here:
rgbinary shipped with644(no execute bit) in v2.1.88rg --files --glob "*.md"— ifrgcan't execute, no commands are foundclaude install(re-registers the native installer, restores permissions)jdainsworthsnb commentedon Apr 1, 2026
That did it. awesome
TacoTakumi commentedon Apr 1, 2026
LOL, you guys released 2.1.89 with the same bug! Unbelievable, nice work!
yurukusa commentedon Apr 5, 2026
@TacoTakumi The fix keeps regressing because each npm install overwrites the binary with the same 644 permissions from the package tarball.
Quick fix (run once after each update):
chmod +x "$(find "$(dirname "$(readlink -f "$(which claude)")")/../vendor/ripgrep" -name rg 2>/dev/null)"Permanent fix — add a SessionStart hook that auto-corrects the permission on every launch. In
~/.claude/settings.json:{ "hooks": { "SessionStart": [ { "matcher": "", "hooks": [ { "type": "command", "command": "for rg in \"$(dirname \"$(readlink -f \"$(which claude)\")\")\"/../../vendor/ripgrep/*/rg; do [ -f \"$rg\" ] && [ ! -x \"$rg\" ] && chmod +x \"$rg\"; done" } ] } ] } }This runs in <1ms and silently no-ops when the permission is already correct. It'll survive every future update until Anthropic fixes the packaging.
dicksontsai commentedon Apr 7, 2026
This issue occurred in 2.1.88 and should be fixed as of 2.1.90.
github-actions commentedon Apr 15, 2026
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.