[BUG]

Resolved 💬 39 comments Opened Jul 29, 2025 by basselemam0612 Closed Aug 6, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

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

  1. Created agent file at ~/.claude/agents/random-generator.md with proper YAML frontmatter
  2. Verified file exists and has correct format
  3. Restarted Claude Code
  4. Reinstalled Claude Code
  5. 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

  1. ✅ Verified correct file location (~/.claude/agents/)
  2. ✅ Verified correct YAML frontmatter format
  3. ✅ Checked file encoding (UTF-8 with LF line endings)
  4. ✅ Created simplified test agent
  5. ✅ Restarted Claude Code multiple times
  6. ✅ Reinstalled Claude Code
  7. ✅ 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.

View original on GitHub ↗

39 Comments

benjamin-johnston-work · 11 months ago

+1

wangkangmao · 11 months ago

+1

zarzet · 11 months ago

+1

Inther-MCe · 11 months ago

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.

EunHyeokJung · 11 months ago

same here

BennyShabtai · 11 months ago

same...

balrokko · 11 months ago

+1

crocware · 11 months ago

+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.

EunHyeokJung · 11 months ago

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

npm un -g @anthropic-ai/claude-code
npm i -g @anthropic-ai/claude-code@1.0.61
claude config set -g autoUpdates disabled

Works for me 👍

saurabhabh · 11 months ago

+1

caesariodito · 11 months ago
Someone left the comment how to downgrade and disable the auto updates in CLI in #4628 (comment) `` npm un -g @anthropic-ai/claude-code npm i -g @anthropic-ai/claude-code@1.0.61 claude config set -g autoUpdates disabled `` Works for me 👍

can confirm 👍

thedelph · 11 months ago

+1

xSyphyx · 11 months ago

+1

p-samuel · 11 months ago

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.

basselemam0612 · 11 months ago
> Someone left the comment how to downgrade and disable the auto updates in CLI in #4628 (comment) > `` > npm un -g @anthropic-ai/claude-code > npm i -g @anthropic-ai/claude-code@1.0.61 > claude config set -g autoUpdates disabled > `` > > > > > > > > > > > > Works for me 👍 can confirm 👍 <img alt="Image" width="1115" height="628" src="https://private-user-images.githubusercontent.com/75000641/472021522-ebcc9e0a-0b3b-4ad0-b101-8897c01663e3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTM4MDA0OTgsIm5iZiI6MTc1MzgwMDE5OCwicGF0aCI6Ii83NTAwMDY0MS80NzIwMjE1MjItZWJjYzllMGEtMGIzYi00YWQwLWIxMDEtODg5N2MwMTY2M2UzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA3MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNzI5VDE0NDMxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViZGRlYzljYmQzMjQyYzRhM2NhYTJlMWZkYTMzYWNkYWVkYWMwYTRkY2RlODhjNTBmYzA4NzA5YzQ0MmQ4MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zQ4pCMBMnX5MkS-6XjtxgXWpyWeYjWaMTRxwVRflcNw">

workd for me as well <3

Woody-ROL · 11 months ago

+1

jeremy-schaab · 11 months ago

+1

testlearnaccess · 11 months ago

+1

0MarkB · 11 months ago

+1

perkins228 · 11 months ago

+1

caesariodito · 11 months ago
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.

I did some digging in the claude code settings documentations, it seems that the claude config set -g autoUpdates false nor claude config set -g autoUpdates disabled is not working properly.

There is another available settings that you (we) can implement using settings.json in user level .claude directory.
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):

{
  "env": {
    "DISABLE_AUTOUPDATER": "1"
  }
}

TLDR;

create settings.json in C:\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!

Aaryan6 · 11 months ago

@caesariodito, and when should we enable this? : )

ImViper · 11 months ago

mark,+1

0MarkB · 11 months ago
> 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. I did some digging in the claude code settings documentations, it seems that the claude config set -g autoUpdates false nor claude config set -g autoUpdates disabled is not working properly. There is another available settings that you (we) can implement using settings.json in user level .claude directory. 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): { "env": { "DISABLE_AUTOUPDATER": "1" } } TLDR; create settings.json in C:\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!

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.

alley-oop-sales-platform · 11 months ago

Same here

Nevrai · 11 months ago

I’m having the same issue. I created two agents in the project (in .claude\agents); they have .md files. /agents still 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 /agents to work properly you can downgrade to 1.0.60:
npm install -g @anthropic-ai/claude-code@1.0.60

0MarkB · 11 months ago
I’m having the same issue. I created two agents in the project (in .claude\agents); they have .md files. /agents still 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 /agents to work properly you can downgrade to 1.0.60: npm install -g @anthropic-ai/claude-code@1.0.60

in 61 it works already

ant-kurt collaborator · 11 months ago

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.

Nevrai · 11 months ago

Fixed in 1.0.63.

Thanks for the fix!

commandodev · 11 months ago

@ant-kurt this isn't working for me on .64 or .65 on nixos. See #4946

B0PE · 11 months ago

Still not working for me with .67

BumpyClock · 11 months ago

/agents and @ mentioning files is still broken on the native Windows build

ant-kurt collaborator · 11 months ago
/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.

trydalch · 11 months ago

Yes. Also seeing this on windows native with both latest and .61. Running Windows 11

ant-kurt collaborator · 11 months ago

Should be resolved in 1.0.70 for Windows native build

thibaud57 · 11 months ago
Should be resolved in 1.0.70 for Windows native build

Not at all having the issue with agents. And again custom commands like in 64

jwcloud365 · 11 months ago

same here, is still not working in 1.0.70.

vmadman · 11 months ago

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

github-actions[bot] · 10 months ago

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.