Patterns

Multi-Agent Patterns

When one Claude isn't enough - parallel research, pipelines, and teams.

When you need more than one

Most tasks are fine for a single Claude session. But some benefit from multiple perspectives or parallel work.

I use these daily.

Pattern 1: Parallel perspectives

The simplest multi-agent pattern: ask multiple agents to look at the same thing from different angles, then synthesize.

Research agents

I have four custom agents defined in ~/.claude/agents/:

AgentPerspectiveModel
research-technicalImplementation details, architecture, code patternsSonnet
research-criticalRisks, limitations, failure modes, counterargumentsOpus
research-strategicMarket positioning, adoption trends, business valueSonnet
research-synthesisConsolidates findings into one coherent reportOpus

When I need to understand something properly, a skill launches the first three in parallel, each with web search and file reading. They work independently. Then the synthesis agent reads all three reports and puts together one analysis.

Why this beats a single agent doing all the research: each one has its own context window and its own focus. The technical agent doesn’t get distracted by market analysis. The critical agent doesn’t get pulled toward optimistic conclusions by the technical details.

How to define an agent

Agent definitions are simple markdown files:

<!-- ~/.claude/agents/research-technical.md -->
---
name: research-technical
description: Technical deep-dive researcher
model: claude-sonnet-4-6
allowed-tools: Read, Grep, Glob, WebSearch, WebFetch
---

Analyze implementation details, architecture, code patterns,
and technical trade-offs. Focus on how things work, not whether
they should exist.

## Methodology

1. Scan - identify key technical components
2. Deep dive - understand implementation details
3. Cross-reference - compare with alternatives
4. Compress - distill into actionable findings

Claude Code uses these definitions when spawning sub-agents. The allowed-tools field is important - research agents don’t need file editing.

Pattern 2: Sequential pipelines

Some workflows need steps that build on each other. The output of step 1 feeds into step 2, which feeds into step 3.

Example: client proposal pipeline

A skill that generates client proposals runs 5 steps: research the client and their industry, draft the proposal from a template, review for accuracy and tone, format the deliverable, final quality check. Each step is a separate agent. If one fails its quality check, the pipeline stops and asks for input.

Building a pipeline

The structure is straightforward:

# My Pipeline

## Step 1: [Name]
Run agent with these instructions: ...
Save output to: [path]
Quality gate: [what must be true to proceed]

## Step 2: [Name]
Read output from Step 1.
Run agent with these instructions: ...
...

Claude follows the steps sequentially, checks quality gates, and stops if something isn’t right. You don’t need orchestration frameworks - a well-written skill file handles the flow.

Pattern 3: Parallel critique

Multiple agents reviewing the same work from different angles, at the same time.

The pattern:

  1. Define 3-5 reviewer perspectives with different focus areas
  2. Launch all reviewers in parallel on the same input
  3. A synthesis agent reads all reviews and consolidates feedback

I use this for writing. Four reviewers, each with a different focus - clarity, structure, tone, accuracy. You’d be surprised how often one catches something the others completely miss.

The key insight

One agent researching for 10 minutes produces a worse result than three agents each researching for 3 minutes with different focus areas. Diversity of perspective matters more than depth.

Agent Teams (experimental)

Claude Code recently added Agent Teams - multiple Claude sessions that can communicate with each other directly, share a task list, and coordinate work.

Unlike sub-agents (which report back to a single parent), team members can message each other, claim tasks independently, and work in parallel on different parts of a project.

This is still experimental and requires opt-in:

{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

Teams are powerful for large tasks - “refactor this codebase” where one agent handles the backend, another the frontend, and a third runs tests. But they’re expensive (each teammate has its own full context window) and still early.

For most multi-agent work, sub-agents in skills are simpler and more predictable.

When to use what

PatternBest forComplexityCost
Single agentMost tasksLowLow
Parallel perspectivesResearch, analysisMediumMedium
Sequential pipelineMulti-step processingMediumMedium
Parallel critiqueReview, quality assuranceMediumMedium
Agent TeamsLarge coordinated projectsHighHigh

Start with single agents. Move to parallel perspectives when you need deeper analysis. Add pipelines when you have repeatable multi-step workflows. Use teams for genuinely large coordinated work.

Practical tips

Keep agents focused. Each agent should have a clear, narrow job. “Research the technical aspects” is better than “research everything.”

Use cheaper models for simple steps. Not every agent needs Opus. Sonnet handles most research and review tasks well. Save Opus for synthesis and critical analysis.

Limit tool access. Research agents don’t need file editing. Review agents don’t need web search. Restricting tools keeps agents from doing things they shouldn’t.

Quality gates matter. In pipelines, define what “good enough” means at each step. Without gates, bad output from step 1 cascades through the entire pipeline.


Official Documentation

  • Sub-agents - Running agents within Claude Code sessions
  • Agent Teams - Orchestrating teams of Claude sessions