Custom slash commands not discovered in CLI/SSH headless mode
Bug: Custom slash commands not discovered in CLI/SSH mode
Environment:
- Claude Code CLI version: 2.0.71
- OS: Linux (Raspberry Pi 5, Debian/Bookworm, aarch64)
- Mode: SSH/headless (no GUI)
Expected behavior:
Custom slash commands in ~/.claude/commands/*.md should be available via /command-name as documented.
Actual behavior:/aios-help returns "Unknown slash command: aios-help"
Setup verified:
- Files exist in
~/.claude/commands/:
````
~/.claude/commands/
├── aios-archive.md
├── aios-config.md
├── aios-context.md
├── aios-help.md
├── aios-init.md
├── aios-restore.md
├── aios-save.md
├── aios-status.md
└── package-remote-context.md
- Permissions:
-rw-rw-r--(readable) - Valid frontmatter verified:
``yaml``
---
description: Display comprehensive help for all AIOS slash commands
---
Steps to reproduce:
- SSH into a Linux machine
- Create
~/.claude/commands/test-command.mdwith valid frontmatter - Run
claudeto start CLI - Type
/test-command - Receive "Unknown slash command: test-command"
Workaround:
Using natural language requests instead of slash commands in headless mode.
Question:
Is this a known limitation of headless/SSH mode, or a bug in command discovery? The documentation suggests slash commands should work in CLI mode.
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗