Project agents: only first alphabetical file loaded from .claude/agents/
Resolved 💬 4 comments Opened Apr 3, 2026 by eleprechaun Closed May 13, 2026
Bug Description
When placing multiple custom subagent files in .claude/agents/, only the alphabetically first file is loaded. All other agent files are silently ignored.
Steps to Reproduce
- Create multiple agent files in
.claude/agents/:
.claude/agents/aaa_agent.md.claude/agents/didi.md.claude/agents/ronny.md
- Start a new Claude Code session
- Open
/agentsdialog
Expected Behavior
All agent files in .claude/agents/ appear under "Project agents".
Actual Behavior
Only the alphabetically first file appears. Renaming a file to be alphabetically earlier causes it to replace the previously shown agent.
Verification
- Confirmed alphabetical ordering: renaming
zzz_test.md→aaa_test.mdcausedaaa_testto appear instead ofdidi - All files have valid YAML frontmatter (
name+description) touch-ing files and restarting does not help- No errors shown anywhere
- Created 5 agent files in one batch — only the alphabetically first was ever loaded
Environment
- OS: Windows 11 Pro
- Project path: network/mapped drive (P:\)
- Claude Code: Desktop App (latest)
Workaround
None available for shared network setups. User-level ~/.claude/agents/ works on single-machine setups but not when the project directory is shared across multiple machines.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗