Spawn Subagents to Work on Multiple Things at Once
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.
Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.
Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.
Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.