subagent_type with custom agents from .claude/agents/ returns 'Agent type not found'
Resolved 💬 3 comments Opened Apr 8, 2026 by ashahawy2 Closed Apr 11, 2026
Description
Custom agents defined in .claude/agents/ as plain markdown files were working as subagent_type values in the Agent tool until ~2026-04-07. As of v2.1.92, they fail with:
Agent type 'dev-engine' not found. Available agents: general-purpose, statusline-setup, Explore, Plan, claude-code-guide
Environment
- Claude Code version: 2.1.92
- OS: Windows 11 Pro (10.0.26200)
- Shell: bash (Git Bash)
Steps to Reproduce
- Create
.claude/agents/dev-engine.mdwith valid agent instructions (plain markdown, no YAML frontmatter — this format worked before) - Use the Agent tool with
subagent_type: "dev-engine" - Error: "Agent type 'dev-engine' not found"
Agent files
$ ls -la .claude/agents/
dev-agent-design.md
dev-engine.md
dev-planner.md
dev-qa.md
dev-reviewer.md
quality-auditor.md
quality-enhancer.md
All files are directly in .claude/agents/ (not nested in subdirectories). They are plain markdown starting with # Agent Name headings.
Expected behavior
subagent_type: "dev-engine" should discover and use .claude/agents/dev-engine.md as the agent definition, as it did prior to this regression.
Actual behavior
Only the 5 hardcoded agent types are recognized: general-purpose, statusline-setup, Explore, Plan, claude-code-guide.
Notes
- No local update was made — this worked on 2026-04-07 and broke on 2026-04-08 without any
claudeCLI update - This appears to be a server-side regression, not a local configuration issue
- This is not the same as #41715 (which covers
/agentsslash command UI and@mention discovery — different code path) - Workaround: spawn
general-purposeagent and include the.claude/agents/*.mdcontent in the prompt manually
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗