claude-code - 💡(How to fix) Fix subagent_type with custom agents from .claude/agents/ returns 'Agent type not found' [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45043Fetched 2026-04-09 08:14:37
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

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

Error Message

  1. Error: "Agent type 'dev-engine' not found"

Root Cause

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

Fix Action

Fix / Workaround

  • No local update was made — this worked on 2026-04-07 and broke on 2026-04-08 without any claude CLI update
  • This appears to be a server-side regression, not a local configuration issue
  • This is not the same as #41715 (which covers /agents slash command UI and @ mention discovery — different code path)
  • Workaround: spawn general-purpose agent and include the .claude/agents/*.md content in the prompt manually

Code Example

Agent type 'dev-engine' not found. Available agents: general-purpose, statusline-setup, Explore, Plan, claude-code-guide

---

$ 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
RAW_BUFFERClick to expand / collapse

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

  1. Create .claude/agents/dev-engine.md with valid agent instructions (plain markdown, no YAML frontmatter — this format worked before)
  2. Use the Agent tool with subagent_type: "dev-engine"
  3. 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 claude CLI update
  • This appears to be a server-side regression, not a local configuration issue
  • This is not the same as #41715 (which covers /agents slash command UI and @ mention discovery — different code path)
  • Workaround: spawn general-purpose agent and include the .claude/agents/*.md content in the prompt manually

extent analysis

TL;DR

The issue can be temporarily worked around by spawning a general-purpose agent and including the custom agent content in the prompt manually.

Guidance

  • Verify that the custom agent files are in the correct location (/.claude/agents/) and are in plain markdown format.
  • Check the Claude Code version to ensure it is 2.1.92, as this issue seems to be specific to this version.
  • Consider reaching out to the development team or waiting for an update, as this appears to be a server-side regression.
  • In the meantime, use the workaround of spawning a general-purpose agent and including the custom agent content in the prompt manually.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue seems to be a server-side regression, and the exact cause is unknown. The workaround provided may not be ideal but can help mitigate the issue until a fix is released.

Recommendation

Apply the workaround of spawning a general-purpose agent and including the custom agent content in the prompt manually, as this is the most straightforward way to mitigate the issue until a fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING