Custom agents in ~/.claude/agents/ not detected by /agents command
Issue Description
Custom agents placed in ~/.claude/agents/ are not being detected or listed by the /agents command, despite following the documented format.
Steps to Reproduce
- Create
~/.claude/agents/someagent.mdwith proper YAML frontmatter:
---
name: someagent
description: Use this agent when you need
[... rest of agent content ...]
- Restart Claude Code
- Run
/agentscommand
Expected Behavior
The someagent agent should appear in the agents list and be available for use.
Actual Behavior
/agentsshows "No agents found"- Only
general-purposeappears as built-in - Custom agent is not detected or usable
Environment
- Platform: Windows 11
- Claude Code: Latest version
- File location:
C:\Users\[username]\.claude\agents\someagent.md - File encoding: ASCII text
- File format: Validated against documentation
Additional Information
- File exists and is readable
- YAML frontmatter follows documented format exactly
- Tried recreating the file multiple times
- Created minimal test agent with same result
- Documentation suggests this should work: https://docs.anthropic.com/en/docs/claude-code/sub-agents
File Contents
The agent file follows the exact format specified in the documentation:
- Valid YAML frontmatter with
nameanddescriptionfields - Proper markdown content below the frontmatter
- No extraneous fields or formatting issues
This appears to be a bug in the agent detection/loading system rather than a user configuration issue.
review this there is a workaround
https://github.com/anthropics/claude-code/issues/4626
I had been using the workaround to downgrade to version 1.0.61 all day with success until about 30 min ago. CC locked up in the terminal. Fired up a new session and downgraded my version only to no longer be able to use my commands or custom agents in 1.0.61
Issues with custom agents, file search, and custom slash commands on Windows should be resolved for CMD and Powershell in 1.0.63, which released today but is not yet tagged as latest.
Downgrading to 1.0.61 will also mitigate.
Just to be clear, @ant-kurt, these issues still persist in 1.0.63 (Windows Native).
- /agents does not see any agents (other than general-purpose) despite both project and personal agents existing.
- @ only shows agents, not files anymore (and in this case only the general-purpose agent).
- Custom / commands do not show either.
Verified version: 1.0.63 (Claude Code)
I'm still seeing this with 1.0.65 installed through nix and though npm. I don't see any custom agents or commands and I don't see anything in the logs when started with -d
Issues still persist for me in 1.0.67 (Windows Native).
Have the same issue on 1.0.67 (MacOS)
For me /agents does not work. Added a sub agent manually to .claude/agents/design-analyzer.md in project , restarted Claude Code in VS Code. But still it is not detected . Updated to latest Claude Code
Claude Code Status v1.0.55
L Session ID: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
Working Directory
L /Users/me/code/project
IDE Integration • /config
✔ Connected to Visual Studio Code extension
L Installed VS Code extension version 1.0.55 (server version: 1.0.67)
Account • /login
L Login Method: Claude Pro Account
L Organization: [email protected]'s Organization
L Email: [email protected]
Model • /model
L Sonnet Sonnet 4 for daily use
TOP TIP: check for MULTIPLE installations of Claude Code. I ended up with three on same machine, each in different location. I uninstalled them all and then did a fresh install from npm install -g @anthropic-ai/claude-code. Agents now being recognized.
I am using Claude on MacOS and this thing just happened to me after using them for the past couple of days with no problem. Claude was not upgraded today. it is version 1.0.67 Weirdly it only sees the agent I have in the user folder, and one of the 7 agents I have in my project folder.
any luck with .69?
Issues still persist for me in 1.0.67 (Windows Native).
For Windows native, this was resolved in 1.0.70.
macOS - please use one of the currently open issues like https://github.com/anthropics/claude-code/issues/5304
the new version of claude code seems to need a header section in the subagent files:
example subagent file:
gui-developer.md
then the header needs to be
---
name: gui-develper
description: GUI developer
model: sonnet
color: blue
---
that worked for me
TOP TIP: check for MULTIPLE installations of Claude Code. I ended up with three on same machine, each in different location. I uninstalled them all and then did a fresh install from
npm install -g @anthropic-ai/claude-code. Agents now being recognized.
This worked for me!
Used "Everything" app to search for "claude.exe" and "claude-code" and just deleted everything that showed up. @ symbol worked to find files after I reinstalled it.
it's still broken for me... :( someone @ me when it's fixed 👍🏾😮💨
@zfogg removing completely and reinstalling fixed it!
I did the scorched earth method above and just deleted every reference to claude.exe / claude-code on my computer. Then ran npm install -g @anthropic-ai/claude-code
not directly related but this tool is a hidden gem and will search for everything instantly (sounds like selling something but honestly just like sharing that it's cool) https://www.voidtools.com/support/everything/
can also install from Ninite (another cool tool if you never used)
going to bed <3
TOP TIP: check for MULTIPLE installations of Claude Code. I ended up with three on same machine, each in different location. I uninstalled them all and then did a fresh install from
npm install -g @anthropic-ai/claude-code. Agents now being recognized.
It was the solution thanks man !
TOP TIP: check for MULTIPLE installations of Claude Code. I ended up with three on same machine, each in different location. I uninstalled them all and then did a fresh install from
npm install -g @anthropic-ai/claude-code. Agents now being recognized.
Works thanks
In my case, I created one .md.backup file, which was causing the issue. Also, I had one md file that was not following the Anthropic sub-agents structure.