[BUG]
Issue Summary
Custom agents created in ~/.claude/agents/ directory are not being detected by the /agents command in Claude Code v1.0.62.
Environment Details
- Claude Code Version: 1.0.62
- Platform: Windows (win32)
- Working Directory: C:\Users\basse
- Agent Directory: C:\Users\basseclaude\agents\
Steps to Reproduce
- Created agent file at ~/.claude/agents/random-generator.md with proper YAML frontmatter
- Verified file exists and has correct format
- Restarted Claude Code
- Reinstalled Claude Code
- Running /agents command shows "No agents found"
Expected Behavior
The /agents command should list custom agents found in:
- ~/.claude/agents/ (user-level agents)
- ./.claude/agents/ (project-level agents)
Actual Behavior
- /agents command only shows "No agents found"
- Only lists built-in "general-purpose" agent
- Custom agents are not detected despite being in the correct location
Investigation Details
File Locations Verified
C:\Users\basse\.claude\agents\random-generator.md (3615 bytes)
C:\Users\basse\.claude\agents\test-agent.md (created for testing)
File Format Verified
Both agent files follow the documented format:
---
name: agent-name
description: Agent description
tools: Tool1, Tool2
---
Agent prompt content...
Directory Structure
C:\Users\basse\.claude\
├── agents\
│ ├── random-generator.md
│ └── test-agent.md
├── projects\
├── statsig\
├── todos\
├── .credentials.json
└── settings.local.json
Attempted Solutions
- ✅ Verified correct file location (~/.claude/agents/)
- ✅ Verified correct YAML frontmatter format
- ✅ Checked file encoding (UTF-8 with LF line endings)
- ✅ Created simplified test agent
- ✅ Restarted Claude Code multiple times
- ✅ Reinstalled Claude Code
- ✅ Verified no permission issues with directories
Root Cause Analysis
The /agents command appears to have a bug in its directory scanning logic where it:
- Does not scan the ~/.claude/agents/ directory
- Does not scan the ./.claude/agents/ directory
- Only recognizes built-in agents
Recommendation
This is a bug in Claude Code that should be reported to the development team. The agent discovery mechanism is not functioning as documented.
Workaround
Currently, there is no known workaround. Custom agents cannot be used until this bug is fixed in Claude Code.
39 Comments
+1
+1
+1
same here, and I also do not see my custom created commands, it was working yesterday I was using sub agents, but today after update it broke.
same here
same...
+1
+1
However there is a prompt hack to get the custom agents to work.
Ask CC to locate your custom agents and list them. It will locate them and be listed. Then tell CC to make them available for the current project. Its not the way it was intended but still it works for now.
Someone left the comment how to downgrade and disable the auto updates in CLI in https://github.com/anthropics/claude-code/issues/4628#issuecomment-3130555663
Works for me 👍
+1
can confirm 👍
+1
+1
This only works once. After you end the session the same error happens again. So you're forced to uninstall and install all over again. At least on my case.
workd for me as well <3
+1
+1
+1
+1
+1
I did some digging in the claude code settings documentations, it seems that the
claude config set -g autoUpdates falsenorclaude config set -g autoUpdates disabledis not working properly.There is another available settings that you (we) can implement using
settings.jsonin user level.claudedirectory.https://docs.anthropic.com/en/docs/claude-code/settings#settings-files
I did use this settings, and I think the auto update is now fully disabled (well at least in my case):
TLDR;
create
settings.jsoninC:\Users\<your_user>\.claude\settings.json(windows), paste the value above, save, try to restart the session and see if the claude version is automatically updated or not.Hope this can help!
@caesariodito, and when should we enable this? : )
mark,+1
This works! Thanks! It kept auto updating to 62 but now it stays on 61. It was especially frustrating because in order for claude to update the custom commands i found i need to restart claude.
Same here
I’m having the same issue. I created two agents in the project (in
.claude\agents); they have.mdfiles./agentsstill says ‘No agents found’. I’m using the latest version (v1.0.62) on Windows 11.This must be a bug in either 1.0.62 or 1.0.61, as downgrading to 1.0.60 solves the problem.
If you want
/agentsto work properly you can downgrade to 1.0.60:npm install -g @anthropic-ai/claude-code@1.0.60in 61 it works already
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.
Fixed in 1.0.63.
Thanks for the fix!
@ant-kurt this isn't working for me on .64 or .65 on nixos. See #4946
Still not working for me with .67
/agents and @ mentioning files is still broken on the native Windows build
ACK, we're looking into this issue with Windows native and will update here when it's resolved.
Yes. Also seeing this on windows native with both latest and .61. Running Windows 11
Should be resolved in
1.0.70for Windows native buildNot at all having the issue with agents. And again custom commands like in 64
same here, is still not working in 1.0.70.
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.