A newly created subagent definition is unavailable to the Agent tool for minutes, with no signal when it becomes available

Status Open
Reported on v2.1.222
Maintainer reply None cached
Activity 0 comments · opened Aug 7, 2026

Environment

  • Claude Code 2.1.222
  • macOS 26.5.2, Node v26.5.0

What happens

Writing a new .claude/agents/<name>.md and immediately dispatching that agent fails:

Agent type 'architect' not found. Available agents: bug-fixer, claude, claude-code-guide,
code-reviewer, design-guardian, diagnostician, Explore, feature-builder, game-producer,
general-purpose, historian, inspector, nba-researcher, Plan, playtest-analyst,
process-critic, product-analyst, qa-tester, realism-critic, sim-engineer, statusline-setup,
test-runner, vercel:ai-architect, vercel:deployment-expert, vercel:performance-optimizer

Several minutes later the agent became available, announced by a system notice
(New agent types are now available for the Agent tool: - architect: …). There is no way to
know in advance how long that takes, and nothing to poll.

Reproduce

  1. Write a new .claude/agents/foo.md with valid frontmatter (name, description, tools, model).
  2. In the same turn, dispatch subagent_type: "foo".
  3. Observe Agent type 'foo' not found.
  4. Continue working; some minutes later the agent appears.

Expected

Either the agent is usable immediately after the file is written, or the error message says
what to do and how long it takes ("agent definitions refresh on X; run Y to reload"). Right now
the failure looks permanent and is indistinguishable from a malformed file.

Why this matters more than the delay itself

The obvious workaround is to dispatch general-purpose with the charter pasted into the prompt.
That silently grants the role tools its charter forbids: my architect charter declares
tools: Read, Grep, Glob and carries no command-prohibition block because it has no Bash
and via the fallback it ran with Bash, Write and Edit over a live working tree containing
uncommitted work. The tools: line in a charter constrains the real agent type and does not
constrain the fallback, so the safe path and the working path disagree for as long as the
delay lasts.

A one-line note in the error message ("charter tools: restrictions do not apply when pasting
a charter into another agent") would remove most of the risk even if the delay stays.

View original on GitHub ↗