Custom slash commands not discovered on Android/Termux due to missing arm64-android ripgrep binary
Bug Description
Custom slash commands from .claude/commands/ are not discovered on Android/Termux. Commands do not appear in /help output and cannot be invoked.
Environment
- Platform: Android (Termux)
- Architecture: aarch64 (ARM64)
- Claude Code Version: 2.0.55
- Node.js reports:
aarch64+Androidplatform
Root Cause
Claude Code uses a bundled ripgrep binary for file discovery, including slash commands. On Android/Termux, the platform is detected as arm64-android, so Claude Code looks for the binary at:
vendor/ripgrep/arm64-android/rg
However, the bundled ripgrep binaries only include:
arm64-darwin(macOS ARM)arm64-linux(Linux ARM)x64-darwin(macOS Intel)x64-linux(Linux x64)x64-win32(Windows)
No arm64-android binary is bundled.
This causes ripgrep to fail silently, which prevents command discovery:
[DEBUG] rg error (signal=undefined, code=ENOENT, stderr: ), 0 results
[ERROR] Error: spawn .../vendor/ripgrep/arm64-android/rg ENOENT
[DEBUG] Ripgrep first use test: FAILED (mode=builtin, path=.../arm64-android/rg)
...
[DEBUG] Slash commands included in SlashCommand tool:
(Empty - no commands loaded)
Workaround
Users can work around this by installing ripgrep via Termux and creating a symlink:
# Install ripgrep in Termux
pkg install ripgrep
# Create symlink to system ripgrep for Claude Code
mkdir -p ~/.local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-android
ln -sf $(which rg) ~/.local/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-android/rg
# Also for global npm installation if applicable
mkdir -p /data/data/com.termux/files/usr/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-android
ln -sf $(which rg) /data/data/com.termux/files/usr/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-android/rg
Note: This workaround needs to be re-applied after Claude Code updates.
Suggested Fix
- Bundle an
arm64-androidripgrep binary - Thearm64-linuxbinary may work on Android since it's Linux-based, but a dedicated Android binary would be more reliable.
- Fallback to system ripgrep - If the bundled binary is missing or fails, Claude Code could check for
rgin$PATHas a fallback.
- Better error messaging - When ripgrep fails, log a warning that command discovery may be affected and suggest installing system ripgrep.
Impact
This affects all functionality that depends on ripgrep for discovery:
- Custom slash commands (
.claude/commands/) - Skills (
.claude/skills/) - Possibly other file discovery features
Steps to Reproduce
- Install Claude Code on Android/Termux
- Create a custom command:
mkdir -p ~/.claude/commands && echo "Test command" > ~/.claude/commands/test.md - Start Claude Code
- Run
/help- the custom command will not appear - Check debug log (
~/.claude/debug/latest) for the ENOENT errors
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗