Custom slash commands and agents fail to load in project directories with spaces in path
Resolved 💬 2 comments Opened Mar 31, 2026 by ctrl-stef Closed May 5, 2026
Bug
Project-level custom commands (.claude/commands/*.md) and agents (.claude/agents/*.md) stop appearing in autocomplete and cannot be invoked via /command-name. The files exist, are properly formatted, and were working previously.
Pattern
Both affected projects have spaces in their directory path:
/Users/.../Downloads/Financial Benchmarks/.claude/commands/competitor-analysis.md/Users/.../Downloads/Reservations Source of Truth/.claude/agents/reservation-reconciler.md
Steps to reproduce
- Create a project in a directory with spaces in the name (e.g.
~/Downloads/My Project/) - Add a
.claude/commands/my-command.mdor.claude/agents/my-agent.mdfile - The command/agent works initially in the session
- After restarting the session (exit + relaunch),
/my-commandor the agent no longer appears in autocomplete and cannot be invoked - The files are still present and unchanged on disk
Expected behavior
Custom commands and agents should load regardless of spaces in the project directory path.
Environment
- OS: macOS Darwin 25.1.0 (arm64)
- Claude Code: CLI (latest)
- Shell: zsh
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗