The Complete Claude Guide
Chapter 18 · CLI

Subagents: built-in and custom agents

Subagents are helper agents the main session can delegate work to: some built-in and some custom. Proper delegation saves main context and parallelizes work.

Verified against source on 2026-09-30

Video

Steps

  1. Understand when delegation pays off: an independent task with a clear definition whose result returns summarized.
  2. Create a custom subagent with its own role, tools and permissions, keeping the definition narrow to prevent stray actions.
  3. Phrase delegations with full context: the task, the relevant files and the expected result shape.
  4. Verify the agent result before relying on it; a good report is no substitute for checking.

Mechanism animation (illustration)

Common pitfall: Do not assume separate context means no inherited permissions or context. Built-in and custom agents have different defaults; inspect the tool set, permission mode and delegation before use.
Hands-on exercise: Create a simple subagent (a testing specialist, for example), delegate a defined task and verify the result against the actual work.
Filmed demo · Video is added in the media phase

Recap

Comprehension check

When is delegating to a subagent worthwhile?

Recap

Official sources

← Previous Back to contents Next →