✻Founding-member pricing: every lesson for $19/mo. The first 3 lessons are free. Start lesson 1 →
Unit 5 · Subagents & Parallel Work · Lesson 24 of 40

Designing Effective Subagents

Design subagents that deliver: single-purpose roles, descriptions that route correctly, least-privilege tools, structured reports and obstacle reporting.

ACADEMY10 min+70 XP4-question quiz

🎯 By the end of this lesson you'll be able to

  • Give each subagent one clear job
  • Write descriptions that route to exactly one agent
  • Apply least-privilege tool access
  • Demand structured output and obstacle reports

Four design principles

1. One job per agent

A "helper" that reviews, tests, documents and deploys does none of those well. Narrow roles (test-runner, security-reviewer, docs-writer) get sharper instructions and better routing.

2. A description that singles it out

Claude chooses a subagent by its description. If two agents both say "helps with code quality", routing becomes a coin flip. Make each description name what triggers it and what it returns:

yaml
description: Runs the test suite, then diagnoses and fixes failing tests. Use after code changes or when tests fail. Returns a list of fixes and the final test status.

3. Least-privilege tools

Give each agent only what its job needs. A reviewer needs Read, Grep, Glob, not Edit. A docs writer may need Edit but not Bash. Limited tools make agents safer and keep them on task.

◎What tools does this agent need?pick the best fit
A security reviewer that reports findings.
Reviewers report. They never change code.
A docs writer that updates markdown files from the code.
It edits docs but has no need to run commands.
A test fixer that runs tests and patches failures.
It must run tests and change code.

4. Structured output and obstacle reporting

The main agent has to use what a subagent returns. Tell the subagent exactly what shape to report in, and what to do when it gets stuck:

markdown
## Report format
STATUS: done | blocked | partial
CHANGED: list of files changed
VERIFIED: the exact command you ran and its result
OBSTACLES: anything that stopped you, and what you'd need to continue

Obstacle reporting is crucial. A subagent that hits a missing credential or an ambiguous requirement should say so rather than guess or quietly skip work.

✻
Ask for evidence

"All tests pass" is a claim. "Ran pnpm test: 214 passed, 0 failed" is evidence. Require the exact command and its result in every report.

Anti-patterns to avoid

  • The do-everything agent, which routes unpredictably and follows instructions poorly.
  • Overlapping descriptions, so the wrong agent gets picked.
  • Full tool access by default, which is riskier and less focused.
  • Free-form reports, which are hard for the main agent to act on.
  • Delegating tiny tasks, which costs tokens and latency for no benefit.
☑Design review for your subagentsaved on this device

Check your understanding

?Lesson quiz10 XP per correct answer · +25 for a perfect score
QUESTION 1 OF 4

Why do overlapping descriptions cause problems?

Why: Routing depends on distinct, specific descriptions.
QUESTION 2 OF 4

What tools should a pure reviewer subagent have?

Why: Reviewers report. They don't need to edit or execute.
QUESTION 3 OF 4

What is 'obstacle reporting'?

Why: Saying what blocked it beats silent guesses or skipped work.
QUESTION 4 OF 4

Which report line is evidence rather than a claim?

Why: The exact command and its result is verifiable.
0 / 4 correct
Academy lesson

Unlock lesson 24 and the next 16

You've finished the free lessons. Join the Academy for $19/month to unlock every lesson, quiz, terminal simulation and puzzle, plus the final exam and your certificate of completion.

  • All 40 lessons across 9 units
  • 165+ quiz questions
  • Final exam + certificate
  • New lessons as Claude Code evolves
  • XP, streaks and badges
  • Cancel anytime

Already a member? Log in to continue.

Key takeaways

  • One job per agent, with a description that names its trigger and output.
  • Least-privilege tools: safer and more focused.
  • Require structured reports with STATUS, VERIFIED and OBSTACLES.
  • Demand evidence, not claims.

Nice work. Lesson 24 done?

Mark it complete to earn +70 XP, keep your streak alive and unlock badges.

Written by Curtis Cornell from Anthropic's public Claude Code documentation. Last reviewed November 14, 2026. Claude Code changes fast; if something here differs from your version, the official docs win.

Start lesson 1 free →