Bundled ripgrep binary loses execute permission on macOS (breaks command/skill discovery)
Resolved 💬 4 comments Opened Apr 1, 2026 by miethe Closed Apr 18, 2026
Bug Description
After updating Claude Code (observed on v2.1.89 via nvm/npm), the bundled ripgrep binary at vendor/ripgrep/arm64-darwin/rg is installed with 644 (rw-r--r--) permissions instead of 755 (rwxr-xr-x). This causes command and skill discovery to silently fail — / slash commands from .claude/commands/ and .claude/skills/ are not listed or invocable.
Environment
- Claude Code version: 2.1.89
- OS: macOS (Darwin 25.0.0, Apple Silicon)
- Node: v20.19.3 (installed via nvm)
- Install method:
npm install -g @anthropic-ai/claude-code
Steps to Reproduce
- Install/update Claude Code via npm on macOS
- Check permissions:
ls -la ~/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg - Observe
rw-r--r--(no execute bit) - Try to use
/commands — custom commands/skills are not discovered
Debug Log Evidence
From ~/.claude/debug/*.txt:
2026-04-01T14:46:00.566Z [DEBUG] Ripgrep first use test: FAILED (mode=builtin, path=/Users/.../@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg)
2026-04-01T14:46:01.091Z [ERROR] Error: Error: spawn /Users/.../@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg EACCES
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Impact
- All custom command and skill discovery silently fails
- No user-visible error — commands simply don't appear in
/menu - Same version (2.1.89) works correctly on a remote Linux host (different binary path, correct permissions)
Workaround
chmod +x ~/.nvm/versions/node/v20.19.3/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg
Then restart Claude Code.
Suggested Fix
- Ensure the npm package sets execute permissions on vendor binaries via a
postinstallscript or by preserving file modes in the tarball - Consider adding a startup warning when the bundled ripgrep fails its first-use test, rather than silently degrading
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗