What are sub-agents and when should I spawn them?

Sub-agents are parallel Claude Code instances spawned by your main session, each with its own context window, working independently on a task you delegate. Useful when:

  • Parallel work: spawn three sub-agents to audit, build, and test in parallel, they each get a fresh context window, so a 30-min audit doesn’t blow your main session’s context.
  • Long-running tasks: a sub-agent can grind on “port these 80 Luma blocks to Hyvä” for an hour while you keep planning in your main session.
  • Specialised personas: a sub-agent with a stricter CLAUDE.md (e.g. “you are a security auditor; only output findings, never edit”) gives you focused output without polluting your main agent’s instructions.

Spawn with the Task tool. They report back to the main session when done, you get the summary, not the keystroke-by-keystroke noise.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on claude code developer guide

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.