[BUG] Custom command in ~/.claude/commands/ not recognized

Resolved 💬 17 comments Opened Mar 31, 2026 by TacoTakumi Closed Apr 7, 2026
💡 Likely answer: A maintainer (dicksontsai, collaborator) responded on this thread — see the highlighted reply below.

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?

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

  1. Create a command file: ~/.claude/commands/test.md
  2. 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_

View original on GitHub ↗

17 Comments

yurukusa · 3 months ago

/tmp/gh-comment-41243.md

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/27888
  2. https://github.com/anthropics/claude-code/issues/35346
  3. https://github.com/anthropics/claude-code/issues/36486

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

TacoTakumi · 3 months ago

I can make them come back by using 2.1.87, go away again with 2.1.88.

willguitaradmfar · 3 months ago

I'm starting to experience exactly the same issue right now, specifically after upgrading to v2.1.88.

Context

  • Everything was working fine before
  • The issue started immediately after using version 2.1.88
  • No changes were made on my side

What I’m seeing

  • Same behavior described in this issue
  • Happens consistently

Environment

  • OS: Linux
  • Claude Code version: 2.1.88

Notes

  • The timing strongly suggests a regression introduced in v2.1.88 rather than a local setup issue
Ahacad · 3 months ago

Same, updated to v2.1.88, no longer recognizing ~/.claude/commands folder, shows unknow skills

jamesnagle · 3 months ago

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 · 3 months ago

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 · 3 months ago
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.

this worked for me

yurukusa · 3 months ago

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.

jwallaceparker · 3 months ago

Thanks @jamesnagle claude install fixed this for me.

luke-timon · 3 months ago

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 rg binary.

How commands are loaded

Claude Code loads custom commands via its vendored ripgrep:

voz() → vh1() → LF() → spawn("rg", ["--files", "--glob", "*.md", path])

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 permission

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.

Fix

chmod +x /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg

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 to

General command to find and fix it:

chmod +x "$(npm root -g)/@anthropic-ai/claude-code/vendor/ripgrep/"*/rg

Why claude install also works

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.

yurukusa · 3 months ago

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 |

jdainsworthsnb · 3 months ago
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 rg binary. ### How commands are loaded Claude Code loads custom commands via its vendored ripgrep:

That did it. awesome

TacoTakumi · 3 months ago

LOL, you guys released 2.1.89 with the same bug! Unbelievable, nice work!

yurukusa · 3 months ago

@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 collaborator · 3 months ago

This issue occurred in 2.1.88 and should be fixed as of 2.1.90.

github-actions[bot] · 3 months ago

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.