Tool Deep Divesサブエージェント

What Is a Subagent? — How Claude Code Lets AI "Divide the Labor," Explained for Everyone

Bottom line: subagents are not about "building one smarter AI" but about "preparing several AIs with different roles and assigning the right one." From the real experience of failing when I made one AI do everything, explained so non-experts can follow.

中澤 圭志

中澤 圭志

@keishi_nakazawa

Sales Claw maintainer

·13 min
What Is a Subagent? — How Claude Code Lets AI "Divide the Labor," Explained for Everyone
This English article is a concise version of the original. For the full Japanese deep-dive, see the Japanese original.

Key Facts

Tool

Claude Code subagents

What it is

One Markdown file with YAML

Set of three

Independent context / custom prompt / tool restriction

Recent

v2.1.154 dynamic workflows

In one line

A subagent means: instead of making one AI do everything, you set up a "team of specialist AIs"—a research specialist, a code-review specialist, a testing specialist—and let work be divided among them. In Claude Code (the command-line edition of Claude for developers), you can add one specialist AI with a single sticky note (a Markdown file). The benefits are three: (1) your main conversation doesn't overflow with side research (it saves memory space), (2) you can restrict "this AI can only use these tools," which is safer, and (3) you can route light work to a cheaper model to cut costs. And in Claude Code v2.1.154 (May 28, 2026), "dynamic workflows" that run hundreds of subagents at once arrived too. This article explains, even for non-programmers, what this really is and how it helps your work—using the metaphor of one overworked new hire vs. building a specialist team.

Bottom line: Subagents are not about "getting one smarter AI." They are about "preparing several AIs with different roles and letting the main AI assign the right one." Think of it as giving a brilliant but overloaded new hire some colleagues for research, review, and testing. The main AI then isn't buried under "scattered research" and can focus on the real task. Because you can narrow each one's tools, it's safer—give the research AI no send permission and it structurally cannot misfire. And because light work goes to a cheaper model, it's easy on the wallet. Conversely, if you skimp on role design, it becomes "team cosplay" that just slows you down—that's the pitfall.

Let me be honest. At first, I (a Sales Claw developer) threw the entire sales workflow at a single Claude. "Research these 44 companies, find each contact form, draft the message, and judge whether to send"—all on one AI. After a while, the AI started saying "wait, which company was that again?" Its head (its context—the working memory an AI can hold at once) was stuffed with research, and its judgment began to drift. What fixed it was exactly this "division of labor" into subagents.

Related reading: What an "AI agent" even means, The "harness" that runs agents, The complete MCP guide for connecting AI to external tools. Subagents are one of the basic building blocks for putting AI to real work, alongside these.

This article cites Claude Code "Create custom subagents" / Claude Code GitHub Releases / Claude Code Changelog as primary sources. See also the Sales Claw free download page.

1. What a subagent is — "a team of specialist AIs" in one line

First, the premise: an "agent" here means an AI that, given one instruction, does the research and the execution itself (see the AI agent definition). The "sub"—a "subordinate" or "specialist colleague" the main AI calls—is the subagent.

[Official] The Claude Code docs define a subagent as a "specialized AI assistant that handles a specific type of task," to be used "when a side task would flood your main conversation with search results, logs, or file contents you won't reference again"—the subagent does that work in its own context and returns only the summary.

[Author's view] Here's the make-or-break analogy. Imagine someone in a meeting saying "let me check all 100 past emails" and reading all 100 aloud right there—awful. The room's air (the context) fills up with irrelevant content. A subagent is the division of labor where you say "go read those 100 in another room and report the key points in three lines." The meeting room (your main conversation) stays clean.

2. Why "one AI for everything" fails

Overview of subagents. On the left, 'one AI does everything' is overloaded (head full of research, implementation, review, testing). On the right, 'subagent division of labor' shows the main AI as a commander while research, review, and testing specialists work in separate heads and return only summaries.
Figure: One AI doing everything (left) vs. dividing work among a specialist team (right). The right frees the main AI's working memory, so it runs longer and more accurately.

An AI has a limit on how much it can hold at once. This is called context (its working memory)—like a human's short-term memory or a desk that's currently full. When the desk fills with paper, new work gets hard. AI is exactly the same: once context fills with what it researched, judgment drifts the further it goes.

[personal_metric / failure] As I wrote above, this is exactly how I first failed. When I threw "research 44 companies, find the forms, draft the messages" at a single Claude, past around the 20th company it started mixing up earlier companies' details. The cause was clear: "throwaway research" devoured the head space that should have been reserved for judgment.

Here's the pitfall: many people think "the AI was wrong because it's dumb," but often it's just that the way the task was handed over was bad. The same AI recovers its accuracy simply by offloading research to a separate head (a subagent). The docs themselves list "preserving context by keeping exploration and implementation out of your main conversation" as the first benefit.

項目One AI does everythingDivide work into subagents
Working memoryFills with research junk fastMain one only gets summaries; stays free
Late-stage accuracyMore mix-ups and forgettingRuns stably for longer
PermissionsKeeps all permissionsTools narrowed per role
CostEverything on an expensive modelLight work routed to a cheaper model
Best forShort one-off tasksLong, repetitive, or parallel work

3. The mechanism — independent context + custom prompt + tool restriction

[Official] Claude Code states that each subagent runs with "its own context window, a custom system prompt, specific tool access, and independent permissions." In plain words:

JargonIn plain wordsEveryday analogy
Independent contextThat AI's own working memory; a separate desk from the main oneA colleague working in another room; messes don't dirty the meeting room
System promptThe "you are the X specialist" role instructionsThe job manual handed over on day one
Tool access / permissionsThe range of allowed tools (search only, can edit, etc.)Which keys you hand over; no send permission for a read-only person

[Author's view] Of these three, the one that matters most for business use is "you can narrow the tools." If you decide "the research subagent never gets a tool that sends data outside," then that AI structurally cannot misfire. Rather than preventing accidents with intelligence, simply don't hand over the dangerous tool—a classic of safe design.

4. How it's invoked — automatic delegation and /agents

Subagent delegation flow. The central main AI sees an incoming task (e.g., 'investigate this code'), matches it against each subagent's description, and delegates to the best fit (research specialist). The specialist works in a separate room and returns a summary, then the main AI proceeds.
Figure: The main AI matches the task against each specialist's description and routes automatically. That's why how you write the description decides routing accuracy.

[Official] Claude Code says "Claude uses each subagent's description to decide when to delegate. When you create one, write a clear description so Claude knows when to use it." So routing intelligence is decided by the quality of the "description" on each specialist.

An everyday analogy: it's the difference between a new colleague's badge saying just "Accounting" vs. "Specializes in invoice-defect checks and monthly expense settlement." With the latter, everyone correctly thinks "let's ask that person." In the AI world too, a vague description means the main AI never knows when to call—wasted talent.

To manage manually, use the /agents command in Claude Code. [Official] From there, choose "create a new agent" and pick whether it's project-level (just for that project) or user-level (usable across all projects). Also, Claude Code v2.1.153 (May 2026) strengthened claude agents autocomplete to even suggest native slash commands and bundled skills.

Sales Claw, too, splits roles internally—research, judgment, pre-send inspection—and runs AI sales safely by never handing dangerous tools to the wrong role.

無料・MIT ライセンス。インストールせずにライブデモも試せます。

5. Build one yourself — four fields in one Markdown file

"Build" sounds like it needs programming, but in reality it's a single note. [Official]A subagent is a "Markdown file with YAML frontmatter" shaped like this:

---
name: research-helper
description: Research specialist that checks a company's public info and returns only the key points. Never sends anything externally.
tools: Read, Grep, WebSearch   # Omit to inherit all tools
model: haiku                   # Omit to inherit the main model
---

You are a corporate research specialist. Look up only public
information about the given company and summarize the facts and
sources in 3-5 lines. Mark any guess explicitly as "guess."
FieldMeaningRequired?
nameThe specialist's name (alphanumeric)Required
descriptionWhen to call it. The most important field; it decides routingRequired
toolsAllowed tools. Omit to use all of themOptional
modelWhich model (e.g., haiku). Save cost with a cheaper modelOptional

[Author's view] To build your first one, the fastest path—also recommended officially—is to "let Claude generate a draft first, then fine-tune it for yourself." Editing a starting point beats writing from zero. And don't forget to narrow tools to "only what's needed." Simply not handing edit/send permission to a research specialist removes one seed of accidents.

6. Getting started — three steps and recent progress

Three-step flowchart to start with subagents. STEP1 'install Claude Code and open /agents', STEP2 'pick one repeated task and create a specialist (start with a research specialist)', STEP3 'write a concrete description and delegate', each with a tip.
Figure: Start with one 'research specialist.' The more concrete the description, the better the main AI routes to it.

[Official] The shortest path: (1) run /agents in Claude Code, (2) choose "Create New Agent," (3) pick project- or user-level and let Claude generate it first, then adjust to taste. The first one is best as a "research specialist that just summarizes and returns"—easy to feel the effect.

Timeline of Claude Code subagent-related updates. May 13, 2026 v2.1.140 fixed subagent-related bugs; May 22 v2.1.149 made /usage show a per-skill/subagent/plugin breakdown; May 28 v2.1.154 added dynamic workflows running dozens to hundreds of agents in parallel.
Figure: Timeline of subagent features (source: Claude Code GitHub Releases / Changelog). In two weeks it went from 'division of labor' to 'hundreds in parallel.'

[Official] Note the recent progress. Claude Code v2.1.154 (May 28, 2026) added "dynamic workflows": ask Claude to create a workflow and it orchestrates work across dozens to hundreds of agents in the background (check runs with /workflows). And v2.1.149 the same month let you see usage broken down by skill, subagent, plugin, and MCP server, so you can tell which specialist is eating cost.

[Author's view] "Hundreds of subagents in parallel" sounds like overkill, but for wide work like "research 1,000 companies one by one," it shines. 100 people doing 10 each beats one doing 1,000—though cost grows in proportion to parallelism, so set limits as a pair (more below).

[Unverified] Exactly how many subagents you can run in parallel depends on your environment, plan, and model, so this article does not assert a hard number. The docs say only "dozens to hundreds"; the safe approach is to test small in your own setup first. [Speculation]Going forward, I expect humans will less often hand-pick "how many to run in parallel," and the AI will increasingly tune parallelism itself based on workload (this is my forecast, not an official statement).

7. Limits and cautions — don't end up in "team cosplay"

Conceptual bar-style chart of three subagent pitfalls by impact: 'sloppy role design (the division loses meaning)', 'non-shared memory (handoff gaps)', and 'cost blow-up from parallelism', arranged by relative operational pain (conceptual figure).
Figure: Three pitfalls of running subagents (conceptual). The key is to treat it as a problem of 'design' and 'limits,' not intelligence.

Pitfall 1 — skimp on role design and you just get slower

[Author's view] The most common failure is "just make five specialists." If roles overlap or descriptions are vague, the main AI dithers over "who do I route this to?" and the supposed division turns into a traffic jam. In my experience, making just one (a research specialist), confirming it "works," then a second is fastest in the end.

If you delegate external-facing work like sales-form submission or support replies to a subagent, in Japan you must check the following.

  • Act on Specified Commercial Transactions (特定商取引法): no exaggeration; an opt-out path is required for email ads
  • Act on Regulation of Transmission of Specified Electronic Mail (特定電子メール法): include sender info (name, address, opt-out method, contact)
  • Act on the Protection of Personal Information (個人情報保護法): state purpose of use, limit third-party provision, handle disclosure requests

[Author's view] A subagent is only a tool, so legal compliance stays with the user. That's exactly why structural brakes—"narrow the send role's permission," "run pre-send inspection"—pay off.

8. Sales Claw angle — measured data from dividing sales work

From here, as a Sales Claw developer, I'll describe how we use "subagent-style division" in actual sales work. Sales Claw is an OSS tool that lowers misfire and ToS-violation risk through policy control, pre-send automatic inspection, sales-NG detection, halting on CAPTCHA detection, send-rate limiting, audit logging, and automatic stop conditions.

The subagent philosophy of "split roles and narrow each one's tools" is the same direction as Sales Claw's design. We split the "research head," the "is-it-OK-to-send inspection head," and the "actually-operate head," and give the inspection head no external send permission. Prevent accidents by structure, not intelligence—that's the shared idea.

Bar chart of Sales Claw measured data. Over a 46-day test, the breakdown of 44 companies processed: 44 processed, 10 actually sent, 31 awaiting_approval (auto-held), 17 skipped, 9 errors—shown honestly. It's noted as a small sample.
Figure: Sales Claw measurements (source: our action-log, 46 days, 2026-03-30 to 05-15). Of 44 companies processed, only 10 were actually sent; the rest were auto-held, skipped, or errored—a small sample.

[personal_metric / dev fact] Honestly, I rewrote the autonomous loop many times before reaching this division. First, one AI for everything → context overflowed and collapsed. Then I over-split roles → handoff gaps. Finally I settled on "split research, inspection, and operation, and give inspection no send permission." The numbers are small (44 companies), but this is a real test value I won't inflate. Precisely because the sample is small, it's worth writing honestly here.

9. Recap — "don't overwork one AI"

The essence of subagents is a shift in thinking: not "get one smarter AI" but "prepare several AIs with different roles and assign the right one."That alone keeps the main one's head uncluttered, makes it safer by narrowing tools, and cheaper by routing light work. In Claude Code you can start with one Markdown file, and v2.1.154's dynamic workflows put hundreds-scale parallelism in view.

Meanwhile, "build a team and it magically gets faster" is not true. Sloppy role design jams; sloppy summaries drop info; more parallelism inflates cost. Subagents' payoff is decided by "design and limits," not "intelligence"—that's my honest conclusion after rewriting it many times.

Checklist before you start using subagents

Before you start using subagents

  • Claude Code is installed and the /agents command opens
  • Picked just one "frequently repeated task" first (e.g., company research)
  • Wrote that specialist's description (when to call it) concretely
  • Narrowed tools to "only what is needed" (no send permission for the research specialist)
  • Set light work to go to a cheaper model (e.g., haiku)
  • Plan to add a second only after confirming the first "works"
  • If using parallelism, set a cost limit / budget
  • Understood the main and subagents do not share memory (handoff via summary)
  • For external sends, checked the relevant Japanese laws
  • Resolved not to skip human final checks out of "I left it to a specialist" comfort

Next action: open /agents in Claude Code and create just one "research specialist that summarizes and returns." If you want to put AI into sales or research work, you can start from the Sales Claw quick-start guide, which builds in role-splitting and safe design from the start.

Related: see the "harness" that runs agents and the complete MCP guide.

This is the English edition. Read the Japanese-language original.

Once you've read this, build one research specialist first. It's the first step to making your AI a 'team.'

無料・MIT ライセンス。インストールせずにライブデモも試せます。

よくある質問

How is a subagent different from an agent?
An agent is an AI that, given one instruction, does the research and execution itself. A subagent is a "specialist colleague" that agent calls, focused on a specific job (research, review, etc.). The main AI offloads side work to the subagent and gets back only the summary, so the main conversation stays uncluttered and it runs longer and more accurately.
Can I build one without programming?
Yes. A subagent is really "one Markdown file with YAML," containing just four fields—name, description (when to call it), tools (allowed tools), model (which model)—plus the body describing the role. The fastest path is the /agents command in Claude Code: let Claude generate a draft, then fine-tune. The more concrete the description, the better the main AI routes to it.
Do more subagents always mean more speed?
No—often the opposite. Adding them with vague roles makes the main AI dither over routing, causing a traffic jam. The main and subagents do not share memory, so handoff relies on summaries, and more parallelism means proportionally more cost. Make one (a research specialist) first, confirm the effect, then add more—and always set tool permissions and a budget limit.
How are subagents different from Skills or MCP?
Roughly: a subagent offloads work to a separate head (an independent context) with a divided role; Skills are reusable playbooks you run within the main head; and MCP (Model Context Protocol) is the wiring that connects the AI to external tools and data. Use a subagent to isolate long research or verbose output from the main conversation, Skills to run routine work while keeping the main context, and MCP to connect to external services. The three are not competitors—you combine them.
Can a subagent call another subagent?
[Official] No—subagents cannot spawn other subagents (a design that prevents infinite nesting). When you need multi-step delegation, the official recommendation is to "chain" subagents from the main conversation, or use Skills. For example: a review specialist surfaces issues → the main AI receives the result → it hands them to a fix specialist. The main AI acts as the conductor bridging each step.
Why is it safer to deny the research specialist any "send" tool?
Because a subagent's tools can be narrowed, deciding "the research specialist never gets a send tool" means that AI structurally cannot send anything externally. The idea is to prevent accidents by not handing over the dangerous tool in the first place, not by relying on intelligence. [Author's view] In Sales Claw too, the "inspection head" is given no external send permission—this is effective for preventing misfires in external-contact work like sales-form submission. But even with narrowed permissions, the rule is never to skip the final human check.

参考文献

本記事は X 公式アカウントと公式ドキュメントを一次情報として参照しています。

  1. [01]
  2. [02]
  3. [03]
  4. [04]
  5. [05]
  6. [06]
  7. [07]
  8. [08]

この記事の著者

中澤 圭志

中澤 圭志

Sales Claw maintainer

Designs and develops Sales Claw. Writes from the field on B2B sales automation and applied AI.

Share this article