Lesson 1049 of 1570
When Claude Code Spawns Sub-Agents to Search in Parallel
Claude Code's Task tool launches mini-agents in parallel — way faster than one agent doing everything itself.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1The big idea
- 2sub-agents
- 3parallelism
- 4Task tool
Concept cluster
Terms to connect while reading
Section 1
The big idea
When Claude Code needs to search 50 files for something, it doesn't read them one by one. It spawns 5 sub-agents (using the Task tool), each searches 10 files, and they report back. This is called 'fan-out.' It's the same trick a manager uses — delegate, then synthesize. Cursor's Composer and OpenAI's Swarm work the same way.
Some examples
- You ask Claude Code 'find every TODO in this repo' — it fans out to 4 sub-agents.
- Cursor splits 'audit this codebase for security issues' across multiple background agents.
- OpenAI's Swarm framework runs three specialist agents (researcher, writer, fact-checker) on one essay.
- Manus uses sub-agents to research 5 competitors in parallel for a market analysis.
Try it!
Ask Claude Code to 'find all uses of useState in this project' on a real repo. Watch the parallel sub-agent spinners.
Key terms in this lesson
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “When Claude Code Spawns Sub-Agents to Search in Parallel”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Builders · 30 min
The Four Ingredients: Goal, Tools, Loop, Stop
Every agent — fancy or simple, local or cloud — boils down to four parts. Learn the recipe and you can read any agent system like a menu.
Builders · 32 min
Your First Agent: A Walkthrough of What It Does
Follow a real agent run step by step — from prompt to result — and see exactly what happens inside. No code yet, just the anatomy of a successful task.
Builders · 32 min
Tools an Agent Might Have: Filesystem, Browser, Code
Agents are only as useful as their tools. Tour the big three — filesystem, browser, code execution — plus the emerging MCP ecosystem, with examples of what each unlocks.
