Custom agents in ~/.claude/agents/ not detected by /agents command
Resolved 💬 22 comments Opened Jul 29, 2025 by dimension-zero Closed Jul 29, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
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.
22 Comments
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).
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
/agentsdoes not work. Added a sub agent manually to.claude/agents/design-analyzer.mdin project , restarted Claude Code in VS Code. But still it is not detected . Updated to latest Claude CodeTOP 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
that worked for me
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-codenot 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
It was the solution thanks man !
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.
In trying to avoid spamming every thread with the same, long, description, I've posted how I fixed this issue here: https://github.com/anthropics/claude-code/issues/4623#issuecomment-3187221181
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.