IntermediateClaude Code

Subagents and parallel work — when to delegate

Spawning a subagent isn't free. Here's when it pays off.

Subagents have their own context, tools, and instructions. Used right, they parallelize work and protect your main context. Used wrong, they double your costs for no benefit. The rules.

10 min read
claude-codesubagentsparallelizationworkflow

A subagent is a separate Claude conversation Claude Code spawns on your behalf. It has its own tools, its own context window, and its own instructions. The main agent gets a single message back — a summary — instead of all the noise the subagent saw on the way to the answer.

That last point is the whole game. Subagents protect the main context.

The three reasons to delegate

1. Independent search across many places

When you ask "where is feature X implemented?" Claude can either grep around in the main context (polluting it with file fragments and dead-end paths) or spawn an Explore subagent.

The subagent does the grepping, file-reading, and ruling-out. Returns: "Feature X lives in src/features/X/, entry point is index.ts:42, called from App.tsx:78 and Router.tsx:12."

The main context stays lean. Claude has the answer it needs without re-reading 30 files.

Best for: broad exploration, "where is X", "find all places that do Y", multi-repo searches.

2. Parallel independent work

You're shipping a feature with three independent prep steps: write tests, update docs, refactor a helper. Each is independent.

Spawn three subagents — one per task — in a single message. They run concurrently. You get three results back instead of doing them sequentially.

Best for: truly independent tasks. Don't parallelize anything where one step's output feeds another's input.

3. Fresh eyes on a hard problem

The main agent has been thinking about a bug for an hour and is anchored on a bad hypothesis. Spawn a code-reviewer subagent: "Independent review — is this fix correct?" The subagent didn't see your dead ends, doesn't have your bias, won't rationalize your half-completed approach.

It often catches what you missed.

Best for: second opinions before merging, "is this safe?", "did I miss a corner case?"

The trap: spawning when you shouldn't

Subagents are not free.

  • Cost. A subagent runs on a real model. The main agent's tokens + the subagent's tokens both bill.
  • Latency. Spawning, briefing, waiting, summarizing — adds 30+ seconds even for small tasks.
  • Coordination tax. You write a prompt for the subagent. It can't see the main context. If the briefing is wrong, the subagent does the wrong thing well.

So: don't delegate "edit this one file." Don't delegate "rename this variable." Don't delegate "is this typo." Just do it in the main agent.

The threshold: if the work involves 5+ tool calls AND the subagent's findings can be summarized in <300 words, delegate. Otherwise, do it inline.

How to brief a subagent well

Subagents start cold. They don't know what you've done, what you've ruled out, why this matters. Treat the prompt like a Slack DM to a smart colleague who walked into the room.

Audit what's left before this branch can ship. Check:
uncommitted changes, commits ahead of main, whether tests
exist, whether the GrowthBook gate is wired up. Report a
punch list — done vs missing. Under 200 words.

That's a good prompt. It states the goal, lists what to check, caps the response length. You'll get a tight punch list back, not a 2000-word ramble.

Bad prompts produce shallow work. Don't write "based on your findings, fix the bug" — that pushes synthesis onto the subagent. Write what you want done, with file paths and line numbers, and let the subagent execute.

Where to go next

  • See 10 Claude Code slash commands/agents lists subagents available in your install.
  • For a code-reviewer subagent that gives independent second opinions, configure one in .claude/agents/code-reviewer.md.
  • Combine subagents with hooks — let a subagent review the diff after every commit.

Keep learning

Apply this with Waymaker

Get this article surfaced where you work

Inside Waymaker, this article shows up next to the right Signal page — so the lesson lands when you need it, not before.

No credit card required.