Custom slash commands not discovered on Android/Termux due to missing arm64-android ripgrep binary

Resolved 💬 3 comments Opened Dec 3, 2025 by bunfield Closed Dec 3, 2025

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 + Android platform

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

  1. Bundle an arm64-android ripgrep binary - The arm64-linux binary may work on Android since it's Linux-based, but a dedicated Android binary would be more reliable.
  1. Fallback to system ripgrep - If the bundled binary is missing or fails, Claude Code could check for rg in $PATH as a fallback.
  1. 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

  1. Install Claude Code on Android/Termux
  2. Create a custom command: mkdir -p ~/.claude/commands && echo "Test command" > ~/.claude/commands/test.md
  3. Start Claude Code
  4. Run /help - the custom command will not appear
  5. Check debug log (~/.claude/debug/latest) for the ENOENT errors

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗