Custom agents in .claude/agents/ directory not loading in Task tool or /agents command
Status Fixed / completed
Maintainer reply None cached
Activity 5 comments · opened Sep 27, 2025 · closed Sep 27, 2025
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?
- Version: 1.0.127
- Platform: Windows
- Issue: Custom agents in .claude/agents/ directory not loading in Task tool or /agents command
- Evidence: claude agents list shows them but they're not available for use
- ✅ Updated: Claude Code 1.0.65 → 1.0.127
- ✅ Agents exist: Files are properly formatted in .claude/agents/
- ✅ CLI recognition: claude agents list shows them
- - ❌ /agents slash command doesn't find them
- ❌ Task tool doesn't load them as available agent types
What Should Happen?
i am expecting Claude Code to load custom agents from the .claude/agents/ directory.
Error Messages/Logs
code-reviewer(Test agent after update)
⎿ Initializing…
⎿ Error: Agent type 'code-reviewer' not found.
Steps to Reproduce
add a custom agent using claude code
edit custom agent wiht my desired agent prompt
restart claude to accept edits
run /agents coomand
result no agents found
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.127
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Had the same problem - custom commands AND agents not showing up in /help even though search was working.
Found the culprit was my ripgrep config. I had --color=always in my ~/.ripgreprc which was embedding ANSI color codes in file paths during Claude Code's
discovery process. It was trying to read files like [0m[1m[32m/path/to/command.md[0m instead of the actual path.
Fixed it by changing --color=always to --color=auto in my ripgrep config. Still get colors in terminal but Claude Code gets clean paths for file
discovery.
Worth checking if you have custom ripgrep settings - might be the same issue.
i added an additional agent and did not select a color. Restarted Claude and now all three agents are found. Confirmed to also be loaded as task tools. Thanks
i added an additional agent and did not select a color. Restarted Claude and now all three agents are found. Confirmed to also be loaded as task tools.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.