The "one subagent per task" rule and when to break it | Claude Code Toolkit
Deep dives

The "one subagent per task" rule and when to break it

The rule works about 80% of the time. The other 20% is where subagent design gets interesting. Here's when to follow the rule, when to combine, when to split further, and how to tell which situation you're in.

MK
Mateo K. September 16, 2026 · 12 min read

Every subagent design guide leads with the same rule: one subagent per task. It's good advice — a subagent that tries to review code AND write tests AND scan security produces mediocre output on all three. The rule prevents a specific and common failure mode. But it's not universal, and treating it as universal produces its own failure mode. We've built and retired maybe 60 subagents over the past year; the ones that didn't survive fell into two categories: too broad (broke the rule badly) and too narrow (followed the rule too rigidly).

This post is the nuanced version. When the rule works. When to break it toward combining. When to break it toward splitting further. And the signals we've learned to look for that tell you which situation you're actually in.

Why the rule works most of the time

Before talking about when to break the rule, worth being clear on why it exists. Three reasons, in order of importance:

Reason 1: Prompt clarity degrades with scope. A subagent that does one thing has a prompt focused on that thing — the criteria are clear, the process is clear, the output format is clear. A subagent that does three things has a prompt with branching logic, mode-switching, and rules that only apply in some modes. Every additional responsibility roughly doubles the prompt complexity.

Reason 2: Tool restrictions can't match multiple responsibilities. A code reviewer should be read-only. A test writer needs write access. If one subagent does both, it needs write access — which means it has write access even when reviewing. The safety scoping breaks.

Reason 3: Testing gets harder combinatorially. Each subagent needs a test set. A single-purpose subagent has a coherent set of test cases. A multi-purpose subagent has multiple disjoint test sets, plus the combinatorial cases of "when should it pick mode A vs mode B" — much more testing surface for the same coverage.

For most subagents, all three reasons apply, and the rule holds. If your instinct is to combine, verify none of these three costs are being ignored.

When to break the rule toward combining

Sometimes two "tasks" are really one task viewed from different angles. Combining them into one subagent is right, and forcing artificial separation makes things worse. Four signals it's time to combine:

Signal 1: Both subagents always fire together

If you have @lint-checker and @style-checker, and every workflow that invokes one also invokes the other, they're one subagent that got artificially split. The overhead of two subagent invocations (two sets of tool descriptions, two rounds of context, two separate reviews of the same code) isn't buying anything — you always want both outputs.

Combining into @code-quality that does both checks in one pass reduces overhead without losing capability. Users get the same information; the tool bill drops.

The test: in the last month, how often was one of these subagents invoked WITHOUT the other? If the answer is "rarely" or "never," they're the same subagent.

Signal 2: Their prompts share 60%+ of content

Some subagents that ostensibly do "different things" have almost-identical prompts. Both need the same context, both apply similar criteria, both produce similar output shapes. The differences are surface-level (a few lines about "focus on X" vs "focus on Y").

When prompts overlap heavily, you're maintaining two copies of essentially the same subagent. Changes to the common parts have to happen in both. Drift between them becomes a maintenance problem. Combining lets you maintain one prompt with two modes — cheaper than keeping two prompts in sync.

The test: lay the two prompts side by side. If the overlap is meaningful (60%+ same content), consider combining.

Signal 3: Their tool restrictions are identical

If @a and @b both need exactly the same tools (same reads, same writes, same MCPs, same restrictions), the tool-restriction argument for separate subagents doesn't apply. One of the main reasons to have separate subagents is different security profiles — if the profiles are the same, that reason evaporates.

Two subagents with identical tool restrictions and overlapping prompts almost certainly want to be one subagent. The separation isn't buying anything real.

Signal 4: Users conflate them

If users regularly invoke the wrong subagent of the pair — meaning to call @a and calling @b, or vice versa — the conceptual boundary between them isn't crisp. Users find the distinction unnatural, and their intuition is often right.

Sometimes the fix is clearer naming. Often the fix is combining — the reason users conflate them is because they're really facets of one thing, not two separable things.

When to break the rule toward splitting further

The opposite failure is subagents that seem singular but are actually doing multiple things wearing one name. Three signals to split:

Signal 1: The prompt has mode-switching

A subagent whose prompt says "if the input is X, do this; if it's Y, do that" is doing multiple things. The if is where the split should happen. Two subagents, each single-purpose, is cleaner than one subagent with branching logic.

We had a @code-analyzer that could do "review this PR" mode OR "understand this legacy module" mode OR "estimate refactor scope" mode. The prompt was 800 words with three separate sections plus routing logic. Splitting into three focused subagents cut each prompt to ~250 words and improved output quality on all three tasks. The routing that had been in the prompt became routing between subagents — cleaner and testable.

The test: can you describe the subagent in one sentence without "or"? If not, it's multiple subagents.

Signal 2: Different tasks need different models

One benefit of subagents is model routing — Opus for judgment, Haiku for bulk classification. If your subagent handles both a judgment-heavy task and a bulk-classification task, it can't take advantage of routing. You're either paying Opus prices for classification work, or getting Haiku-quality judgment.

Split the tasks. Each new subagent gets the right model. Overall cost drops; quality goes up on the judgment task.

Signal 3: Output shapes differ meaningfully

If the same subagent produces structured PR review comments for some invocations and prose explanations for others, downstream consumers can't reliably parse the output. They have to detect which shape they got, handle both. This is fragile.

Separate subagents let each have a stable output shape. Consumers know what to expect. Automation on top becomes easier.

Two examples that resisted the default

Concrete cases where we broke the rule (in both directions) and it was the right call.

Example 1: Combining reviewer + fixer

For a while we had @pr-reviewer (finds issues) and @pr-fixer (proposes fixes). Two subagents, single-purpose each, textbook rule-following.

Problem: the reviewer's findings were the fixer's inputs. Every workflow that used the fixer had to first invoke the reviewer, capture output, format it as fixer input, invoke the fixer. Two subagent invocations, two sets of context, two rounds of tool descriptions — for a workflow that logically wanted to be "review AND propose fixes for anything found."

Combining into @pr-reviewer-with-fixes that did both in one pass cut latency by 40% and cost by 35%. The prompt grew from 300 to 450 words (not doubled — a lot of context was shared). Testing surface didn't explode because "review then propose fix" is a natural sequence, not disjoint modes.

The rule said "keep separate." The measured outcomes said combine. We combined. It stuck.

Example 2: Splitting the "docs helper"

Opposite direction. We had @docs-helper that could: write new docs for a feature, update existing docs when code changed, find outdated docs during audits, and translate docs between formats. One subagent, four related-but-distinct capabilities.

Problem: the prompt was 1200 words with routing logic. Testing was hard — four disjoint capabilities meant four disjoint test sets plus routing tests. Quality varied by task: excellent at "write new docs," mediocre at "audit for outdated," poor at "translate formats." One subagent trying to be four specialists doesn't become an expert generalist; it becomes a mediocre everything.

Splitting into four focused subagents solved the problem. Each got a 250-word prompt. Testing was tractable per subagent. Users invoke the specific one they need. Quality improved on all four tasks compared to the combined version.

The rule said "one subagent per task." We'd been treating "docs helper" as one task; it was four. The split fixed it.

The nuanced version of the rule

After breaking the rule in both directions across many subagents, the rule we actually use isn't "one subagent per task." It's more like:

One subagent per coherent unit of work. Where "coherent" means: fires together, needs the same tools, produces similar-shaped output, and can be described in one sentence without "or."

Sometimes a "coherent unit of work" is one narrow task (write commit messages in our style). Sometimes it's two closely-related tasks that always co-occur (review + propose fix). Never is it a general capability with mode switching.

The default is still "one subagent per task" because most coherent units of work are single tasks. But when a candidate for combining or splitting appears, apply the coherence test — don't default-reject or default-accept.

The design conversation to have

When someone proposes a new subagent, or when reviewing an existing one, three questions:

  1. What is the coherent unit of work here? Not "what does it do" — what's the natural unit? Sometimes this is smaller than the proposal; sometimes bigger.
  2. What forces the current shape? If combining these two would help, what's blocking that? (Often nothing — they're separate because that was the default.)
  3. What breaks if we split further? If splitting would help, is there something that requires them to be together? (Often shared context that could be handled differently.)

These questions surface the actual design constraints. Most of the time, the answers align with the default rule. Some of the time, they reveal that the default is producing a worse design than a considered exception would.

The heuristic in one line

One subagent per coherent unit of work — where "coherent" means fires together, uses the same tools, produces similar output, and can be described in one sentence without "or." The default assumption is one-per-task; the actual rule is one-per-coherence.

What this means for your subagent library

If you're building a subagent library, start with the default: one subagent per task, single-purpose, well-scoped. This gets you 80% of the way to a good library on autopilot.

Then, quarterly, audit the library for two patterns: (1) subagents that always fire together (candidates for combining), (2) subagents with mode-switching in the prompt (candidates for splitting). Either pattern is a small design fix; catching them early keeps the library coherent.

The library that emerges isn't a pile of single-purpose subagents. It's a set of coherent capabilities, each sized appropriately for its actual coherent unit of work. Some will be narrow single-task subagents. A few will be broader combined ones. That's fine. The rule was always a heuristic, not a law.

MK

Written by

Mateo K.

Mateo focuses on platform engineering, agentic workflows, and turning experimental patterns into infrastructure that scales.

Get cctk running in one command

85 slash commands, 12 subagents, 12 MCP integrations, 12 hooks. All the patterns from this post are shipped in cctk.

npx cctk@latest init Get cctk v1.5.2 →