[BUG] Custom Slash Commands Not Loading on Termux

Resolved 💬 9 comments Opened Oct 12, 2025 by rosaldo Closed Mar 1, 2026

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/ are not being discovered or loaded when running Claude Code in Termux on Android. The exact same file structure works perfectly on a standard Linux x86_64 system.

Commands fail to load whether placed in:

  • Root directory: .claude/commands/test.md
  • Subdirectories: .claude/commands/agent-os/*.md

The SlashCommand tool also cannot access these commands, returning Unknown slash command errors.

What Should Happen?

Custom slash commands defined in .claude/commands/ should be automatically discovered when Claude Code starts and be available for use via /command-name syntax.

This behavior works correctly on Linux x86_64 with the same Claude Code version (2.0.14) and identical file structure.

Error Messages/Logs

Unknown slash command: test


When using SlashCommand tool programmatically:

Unknown slash command: test

Steps to Reproduce

  1. Install Claude Code 2.0.14 in Termux on Android:

``bash
npm install -g @anthropic/claude-code
``

  1. Create a test directory with .claude/commands/ structure:

``bash
mkdir -p teste/.claude/commands
cd teste
``

  1. Create a simple test command file .claude/commands/test.md:

```markdown
# Test Command

This is a test command to verify if commands work.

Just respond with "Test command works!"
```

  1. Set proper permissions (matching working Linux system):

``bash
chmod 755 .claude .claude/commands
chmod 644 .claude/commands/test.md
``

  1. Verify file is correct:

``bash
file .claude/commands/test.md
# Output: Unicode text, UTF-8 text
``

  1. Start Claude Code:

``bash
claude
``

  1. Try to use the command by typing /test

Expected: /test command should be available and executable
Actual: Command is not discovered or loaded at all

Also tested with subdirectories (e.g., .claude/commands/agent-os/new-spec.md) - same result.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.14 (Claude Code)

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Xterm

Additional Information

SECTION: Operating System

Broken Environment (where bug occurs):

  • OS: Android/Termux (aarch64)
  • Kernel: Linux localhost 6.1.115-android14-11-ga2521ca27699-ab13294383
  • Node.js: v24.9.0

Working Environment (for comparison):

  • OS: Linux x86_64 (openSUSE)
  • Kernel: 6.17.0-2-default
  • Node.js: v24.1.0
  • Same Claude Code version: 2.0.14

---

SECTION: Terminal/Shell

(Which terminal are you using?)

  • Terminal: Termux
  • Shell: bash (/data/data/com.termux/files/usr/bin/bash)
  • TERM: xterm-256color

---

SECTION: Additional Information

(Anything else that might help us understand the issue?)

Investigation Performed

System commands verified present:

  • find (GNU findutils 4.10.0)
  • ls (GNU coreutils 9.8)
  • cat, stat, readlink, realpath, file (5.46-2)

File verification:

  • Encoding: UTF-8 (verified with file and hexdump)
  • No hidden characters or corruption
  • Permissions match working Linux system (755 for dirs, 644 for files)

Attempted fixes (none worked):

  1. Restarted Claude Code multiple times
  2. Fixed permissions to match working system
  3. Installed missing file command
  4. Moved commands from subdirectory to root
  5. Tried SlashCommand tool programmatically - also fails

File structure tested:

.claude/
├── commands/
│   ├── test.md              # Doesn't load
│   ├── newspec.md           # Doesn't load
│   └── agent-os/            # Subdirectory
│       ├── new-spec.md      # Doesn't load
│       └── [other .md]      # Don't load
└── agents/
    └── agent-os/            # Custom agents also not loading
        └── [.md files]

Hypothesis

Possible root causes:

  1. Path resolution - Termux uses non-standard paths (/data/data/com.termux/files/...)
  2. File system differences - Android file system handling may differ
  3. Native dependencies - Some native module behaving differently on ARM64 Android
  4. Node.js in Termux - File system operations may work differently

Impact

This prevents Termux users from using custom slash commands and agents - a core extensibility feature. Given Termux's popularity among mobile developers, this significantly limits Claude Code's usefulness on Android devices.

Workaround

None available for Termux users. Only workaround is to use standard Linux x86_64 system.

View original on GitHub ↗

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