Claude Code doesn't have to do everything sequentially. For big tasks, it can spawn subagents — lightweight child processes that work in parallel.
"Update the API routes, add tests for each one,
and update the README — use subagents for each task"
When you ask Claude to use subagents, it acts as a manager — breaking the work into independent pieces and delegating each one. The built-in agent types are:
- Explore — fast file discovery and codebase search
- Plan — architecture research and implementation strategy
- General-purpose — complex multi-step tasks with full tool access
Subagents inherit all the tools from your main session, including any MCP servers you've configured.
A few practical patterns:
# Refactor across multiple modules simultaneously
"Refactor the user, product, and order modules to use
the new BaseService class — use parallel subagents"
# Research before implementing
"Use a Plan agent to design the auth flow, then
implement it once I approve"
You can also ask subagents to work in isolated git worktrees, so they don't interfere with your current branch while they experiment. When they're done, Claude returns the worktree path and branch so you can review and merge.
Think of subagents as junior developers you can spin up on demand — delegate the grunt work and review the output.
Log in to leave a comment.
The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.
The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.