Claude Code Won’t Use Your Subagent? How to Make It Delegate

Claude Code Won’t Use Your Subagent? How to Make It Delegate

If your Claude Code subagent is not used, there are two likely reasons. Either the file never loaded, or it loaded and Claude decided to do the task itself. Type @ in the prompt to see which subagents loaded, then ask for yours by name: “Use the bug-reviewer subagent to check this file”, or @agent-bug-reviewer when it must run.

We tested this in a small project with five subagent files. Only one of the five loaded. And the one that loaded was still skipped when we asked a plain question, even after we rewrote its description.

This guide covers every cause we found, with the real terminal output for each, and the fix. The short version: the description is only a hint, and naming the subagent is what made Claude delegate in our tests.

Browse all our Claude Code tutorials for more fixes and how-tos.

Tested with Claude Code v2.1.332 on macOS on December 2, 2026. We used a throwaway demo project called shop-api, started with project and local settings only. The main session ran on Sonnet, and each delegation test was run once, so treat the results as one demo and not a benchmark.

Quick Summary: Why a Claude Code Subagent Is Not Used

CauseWhat you seeFixHow we checked it
File is outside .claude/agents/Subagent missing from the @ listMove it to .claude/agents/name.mdTested in the terminal
Blank line above the opening ---Missing from the @ list, no errorMake --- the first lineTested in the terminal
No description fieldMissing from the list, error in the debug logAdd a descriptionTested in the terminal
YAML that does not parseMissing from the list, error in the debug logFix the frontmatterTested in the terminal
Small task, description onlyClaude reads the file and answers itselfName the subagent or @-mention itTested in the terminal
Agent(name) in permissions.denyClaude says a permission rule blocks itRemove the deny ruleTested in the terminal
Misspelled tools list“would be spawned with zero tools”Use real tool names such as ReadTested in the terminal
File is in an --add-dir folderEdits are not picked upRestart Claude CodeFrom the official docs

How Claude Code Decides to Delegate to a Subagent

A subagent is a Markdown file with a name, a description and a system prompt. Claude runs it in its own context window and gets back only a summary. If you are new to the idea, start with our guide to Claude Code subagents.

The official subagents documentation says Claude delegates based on three things: the task in your request, the description field of each subagent, and the current context. That means delegation is a judgment call. Nothing forces Claude to pick your subagent just because the description matches.

The same page lists when the main conversation is the better place for a task: quick, targeted changes, work that needs back-and-forth, and cases where speed matters. A subagent starts fresh and needs time to gather context. So for a small job, skipping the subagent is often the expected behavior, not a bug.

A description tells Claude when a subagent could help. Only your prompt tells Claude that you want it used.

So there are two separate questions to answer. Did the subagent load? And if it did, how strongly did you ask for it?

Step 1: Check That the Subagent Actually Loaded

Our demo project started with five subagent files. One was correct and four had a common mistake each.

.claude/agents/helper.md        (correct)
.claude/agents/doc-writer.md    (blank line above the first ---)
.claude/agents/test-planner.md  (name, but no description)
.claude/agents/sql-helper.md    (broken YAML: unclosed quote)
agents/changelog-writer.md      (not inside .claude)

To see what loaded, type @ in the prompt and look at the entries marked (agent). Ours showed the built-in agents plus one of our own. The other four files were silently ignored, with no notice at startup.

Claude Code @ menu listing built-in agents and only the helper subagent, while five subagent files exist in the project
Five files on disk, one subagent in the @ list. If yours is not here, Claude cannot delegate to it.

Why /agents no longer helps

Many older guides tell you to run /agents to check. In the current version that command only prints a reminder. The docs say the interactive wizard, with its list of subagents, exists only in v2.1.197 and earlier.

Claude Code /agents command printing that the agents wizard has been removed, with the two folders where subagent files go
In v2.1.332, /agents prints the two folders and nothing else. Use the @ list to see what loaded.

Find the broken file with the validator

For frontmatter problems, run the validator from your shell. It checks every file in the folder you name.

claude plugin validate .claude/agents
Output of claude plugin validate on the agents folder, reporting a YAML parse error in sql-helper.md and a missing description in test-planner.md
The validator caught the broken YAML and the missing description.

It found two of our four broken files. It did not flag the file with the blank first line, and it cannot know about a file sitting in the wrong folder. The docs also note that it does not flag a file whose frontmatter parses but has no name.

Read the debug log

The second check is the debug log. Start Claude Code with a log file, exit, and search the log for your agents folder.

claude --debug-file debug.log
grep -i "agents/" debug.log
Claude Code debug log lines showing a YAML frontmatter parse failure for sql-helper.md and a missing required description field for test-planner.md
The log names each skipped file and the reason. Our grep filter was a little narrower than the one above.

Again, two files were named. The blank-line file and the wrong-folder file left no trace at all. According to the docs, a file without readable frontmatter is treated as documentation kept next to your agents, so Claude Code does not see it as an error.

The rules a subagent file must follow

Here are the load rules from the official docs. Our four broken files each broke one of them.

  • The file goes in .claude/agents/ for one project, or ~/.claude/agents/ for all your projects. Subfolders inside those are fine.
  • The opening --- must be the first line of the file.
  • Both name and description are required.
  • The name cannot start with -, contain :, or be longer than 256 characters.
  • The YAML must parse. One unclosed quote drops the whole file.
  • Project subagents are found by walking up from the folder where you start Claude Code to the repository root. Start it in the wrong place and they are not there.

For a correct template of every field, see our subagent file format examples. The same kind of path mistakes hide custom commands, which we covered in the fix for a missing slash command.

Step 2: Claude Does the Work Itself

This is the case most people mean by “Claude Code won’t use my subagent”. The file is fine, the subagent is in the list, and Claude still handles the task alone.

Our working subagent had a lazy description:

---
name: helper
description: Helps with code.
tools: Read, Grep, Glob
model: haiku
---

You are a careful Python bug reviewer. Read the file you are given and
report real bugs only.

We asked a plain question: “Check orders.py for bugs. Report only, no edits.” Claude read the file and answered in ten seconds. No subagent ran.

Claude Code answering a bug check request directly after reading one file, with no subagent row in the transcript
A delegation shows up as a row with the subagent’s name. Here there is only “read 1 file”, so Claude did the work itself.

That is fair. “Helps with code” gives Claude no reason to pick this subagent for a bug check.

A better description was not enough for a small task

The docs suggest making the description specific and adding a phrase like “use proactively”. So we renamed the subagent and rewrote the description:

name: bug-reviewer
description: Reviews Python files for bugs and risky logic. Use proactively whenever the user asks to check, review or find bugs in code.

We started a new session and sent the exact same prompt. The result surprised us: Claude again read the file and answered itself.

Claude Code answering the same bug check directly, without delegating, even though the subagent description now says to use it proactively for bug checks
Same prompt, much better description, same outcome. For one 23-line file, Claude judged the direct route faster.

This is one run on one model, so do not read it as “descriptions do not work”. A clear description still matters when you have several subagents and Claude has to route between them. But it shows that a description alone will not push a small task to a subagent.

For a job this size, Claude’s choice matches what the docs recommend. Where automatic delegation tends to pay off is work that produces a lot of output, such as running a test suite or searching many files. Our subagent best practices guide goes deeper on descriptions.

Fix 1: Ask for the Subagent by Name

The docs list three ways to request a subagent yourself. The first needs no special syntax. You just name it.

We went back to the vague helper subagent and asked: “Use the helper subagent to check orders.py for bugs. Report only, no edits.” This time Claude delegated right away.

Claude Code transcript showing a helper subagent row with Backgrounded agent, then the subagent finishing and Claude reporting its findings
The row “helper(Check orders.py for bugs)” is the proof of delegation. It ran in the background and finished in 7 seconds.

Two things are worth noting here. The subagent with the worst possible description still ran, because we asked for it. And it started in the background, which is the default in current versions, so Claude told us it would pass along the findings when it finished.

The docs word this carefully: when you name a subagent, Claude “typically delegates”, and it still decides. In our test it did.

Fix 2: @-Mention the Subagent So It Must Run

The second way is stronger. The docs say an @-mention tells Claude to run that subagent for one task.

Type @, pick the agent from the list, and add your request. Or type the mention by hand as @agent- plus the name.

@agent-bug-reviewer check orders.py for bugs. Report only, no edits.
Claude Code prompt starting with @agent-bug-reviewer, followed by a bug-reviewer subagent row and the three issues it reported
The same file and the same task that Claude handled alone earlier. With the @-mention, the bug-reviewer subagent ran.

One detail from the docs: while you type the manual form, the menu shows file matches instead of agents. That is normal. The mention still resolves when you press Enter, and it did for us.

Fix 3: Run the Whole Session as the Subagent

The third way removes the choice completely. Start Claude Code with --agent and the main conversation itself takes on that subagent’s prompt, tool limits and model.

claude --agent bug-reviewer
Claude Code startup header showing @bug-reviewer before the folder path after starting with the --agent flag
The header shows @bug-reviewer, so you can confirm the session is running as that subagent.

To make this the default for a project, the docs give a setting for .claude/settings.json:

{
  "agent": "bug-reviewer"
}

We captured the startup header only and did not send a prompt in this mode. Keep in mind that the subagent’s system prompt replaces the default Claude Code prompt here, so use it for focused sessions, not for general work.

Diagram of four ways to get a Claude Code subagent used, from description only to naming it, @-mention and the --agent flag, with the result of each in our test
The four levels, weakest to strongest, with what happened in our session.

Fix 4: Remove a Deny Rule That Blocks the Subagent

Sometimes Claude wants to delegate and is not allowed to. A deny rule in the form Agent(name) turns off one subagent. We added this to the project’s .claude/settings.json:

{
  "permissions": {
    "deny": ["Agent(bug-reviewer)"]
  }
}

Then we asked for the subagent by name. Claude looked for the agent first, then told us plainly that a project permission rule blocks it, and offered to review the file itself.

Claude Code saying it could not run the bug-reviewer subagent because of the Agent(bug-reviewer) permission rule, followed by a readme-checker subagent failing with a zero tools error
Top: the deny rule message. Bottom: the zero tools error from the next fix.

One trap: the denied subagent still appeared in our @ list. So the list tells you a file loaded, not that it is allowed to run.

If Claude mentions a permission rule, search every settings file for Agent(. Our guide to settings file locations shows where they all live.

The docs list three more switches that have the same effect on a wider scale:

  • Denying the Agent tool itself stops all delegation.
  • The --disallowedTools "Agent(name)" flag blocks one subagent for a session.
  • In an agent started with --agent, a tools line such as Agent(worker, researcher) allows only those subagent types, and leaving Agent out allows none.

For how deny rules are matched, see our guide to Claude Code permissions.

Fix 5: Repair the Tools List

The last cause looks different. The subagent is chosen, starts, and fails at once. We wrote a subagent with tool names that do not exist:

tools: ReadFile, SearchFiles

When we asked for it, the launch was refused with this message, visible in the lower half of the screenshot above:

Agent 'readme-checker' would be spawned with zero tools - refusing.
Its tools list resolved to nothing: unrecognized [ReadFile, SearchFiles].
Fix the agent's tools frontmatter or pass a different subagent_type.

The fix is to use real tool names, such as Read, Grep, Glob, Bash, Edit and Write. Or delete the tools line, and the subagent inherits every tool available to subagents. The official error reference has an entry for this message.

A quieter version of this problem comes from the docs, and we did not test it. Subagents run in the background by default, and a background subagent keeps only a set list of built-in tools.

Other built-in tools are removed without an error, even if you list them. A few tools, such as AskUserQuestion, are never given to any subagent.

So if your subagent runs but cannot do part of its job, check its tools line against that list. A misspelled field name is also ignored without an error, so write disallowedTools and maxTurns exactly as the docs do.

After the Fixes: Every Subagent Loaded

We repaired every file, including the one with bad tool names: moved one into .claude/agents/, deleted the blank first line, added the missing description, closed the quote and corrected the tool names. The validator passed, and the @ list showed all of them.

Validation passed message followed by the Claude Code @ menu listing bug-reviewer, changelog-writer, doc-writer, readme-checker, sql-helper and test-planner as agents
Validation passed, and every custom subagent is in the list.

Do you need to restart after editing a subagent? Usually not. The docs say Claude Code watches both agents folders and picks up a change within a few seconds.

They name two exceptions: agent folders inside directories added with --add-dir, and sessions started with --disable-slash-commands. In our test we restarted between changes, so the no-restart behavior comes from the docs.

Checklist for a Claude Code subagent that is not used: check it loaded, ask by name, @-mention it, remove deny rules, then fix the tools list
The order we would check things in.

Other Reasons a Subagent Is Skipped

These come from the official docs. We did not reproduce them.

  • Name clashes. When two subagents share a name, the higher-priority location wins: managed settings, then the --agents flag, then the project, then your user folder, then plugins. Your edit may be going into the copy that loses.
  • Two files in the same folder with the same name. Only one loads. The /doctor checkup reports these.
  • Plugin subagents use a scoped name such as my-plugin:code-reviewer. Ask for that full name.
  • Too many descriptions. Past 15,000 tokens of combined descriptions, Claude Code shows a startup warning. Every subagent still loads, but long descriptions make routing harder, so keep them short and specific.
  • A model that is not allowed. If an availableModels allowlist blocks the subagent’s model, it runs on a different one. Our guide to subagent models covers the order.

Try It Yourself

Open any project in Claude Code and paste this prompt. It creates one working subagent.

Create a project subagent at .claude/agents/bug-reviewer.md.
Frontmatter must start on line 1 with name, a one-sentence description
that says when to use it, and tools: Read, Grep, Glob.
The system prompt should tell it to report real bugs only, in under
120 words. Do not create any other files.

Then type @ and check that bug-reviewer (agent) is listed. Ask a plain question about a file and see whether Claude delegates. Then repeat it with @agent-bug-reviewer in front and compare the two transcripts.

Common Mistakes

  • Saving the file in agents/ or .claude/agent/. The folder is .claude/agents/, plural, with the dot.
  • Leaving a blank line or a comment above the opening ---.
  • Writing a name and forgetting the description.
  • Running /agents and expecting a list. It no longer shows one.
  • Expecting a description to force delegation on a one-file task.
  • Guessing tool names. ReadFile is not a tool; Read is.
  • Forgetting an old Agent(name) deny rule in a settings file.
  • Assuming the subagent ran because the answer looks right. Look for the row with its name.

Pro Tips

  • Make the @ list your first check, and the validator your second.
  • Put the trigger in the description: say what the subagent does and when to use it, in one or two sentences.
  • For steps that must always go to a subagent, write the @-mention into your prompt or a custom command instead of hoping for automatic delegation.
  • After a background subagent finishes, run /tasks to open its transcript. The docs say it stays listed for about 30 seconds.
  • Use subagents for noisy work such as test runs and wide searches. That is where delegation saves context, and our guide to parallel agents shows the pattern.
  • For other error text, see our list of common errors.

Cheat Sheet

Cheat sheet for a Claude Code subagent that is not used: where the file goes and what it needs on the left, the ways to make it run on the right
Loading rules on the left, ways to make it run on the right.

Frequently Asked Questions

Why is my Claude Code subagent not used automatically?

Either the file did not load, or Claude judged the task quicker to do itself. Type @ to confirm the subagent is listed. If it is, name it in your prompt or use @agent-name.

How do I force Claude Code to use a subagent?

Use an @-mention such as @agent-bug-reviewer for one task. For a whole session, start with claude --agent bug-reviewer or set "agent" in .claude/settings.json.

How do I see which subagents are loaded?

Type @ in the prompt and look for entries marked (agent). The /agents command no longer lists them. For files that fail to load, run claude plugin validate .claude/agents or read the debug log.

Does “use proactively” in the description guarantee delegation?

No. The docs say it encourages delegation, and in our single test Claude still handled a one-file task itself. It is a hint that helps Claude route work, not a rule.

Do subagents work the same outside the terminal?

The same files are used by other Claude AI coding surfaces, and the docs describe the same delegation rules for VS Code and the desktop app. We tested only the interactive terminal on macOS.

Conclusion

When Claude Code won’t use your subagent, check loading first: type @, and if the subagent is missing, fix the folder, the first-line ---, the name and description, and the YAML. If it is listed and still skipped, stop relying on the description. In our tests a plain request was handled by Claude itself both times, while naming the subagent or using @agent-name delegated every time. If Claude says it is blocked, look for an Agent(name) deny rule, and if the launch fails, correct the tools list. Keep automatic delegation for large, noisy tasks, and ask by name for everything else.

Newsletter

New AI tools in your inbox

The best new tools and the AI news that matters, in one short email. Unsubscribe any time.

Free · No spam · Unsubscribe any time

✓ Looks like you’re subscribed

Loading Google’s sign-up form…

Looks like you’re already subscribed

Thanks for reading! New AI tools and the AI news that matters will land in your inbox.

Not subscribed yet? Refresh the page to load the sign-up form.

The sign-up form couldn’t load. If you use an ad or content blocker, allow news.google.com and reload the page.

Free instant check before you pay. Takes a few seconds.

Scroll to Top