Custom slash commands not discovered in CLI/SSH headless mode

Resolved 💬 3 comments Opened Dec 16, 2025 by bhandrigan Closed Dec 20, 2025

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:

  1. SSH into a Linux machine
  2. Create ~/.claude/commands/test-command.md with valid frontmatter
  3. Run claude to start CLI
  4. Type /test-command
  5. 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

View original on GitHub ↗

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