Agentic Workflows — Mastery6 / 8
Subagents — Delegating Work That Scales
One giant context gets slow and vague. Subagents let the main agent hand focused work to specialists with their own context and tools — and run them in parallel.

A single conversation that does everything eventually does nothing well: the context fills with exploration, and the agent gets slower and vaguer. Subagents fix this by delegation.
What a subagent is
A subagent is a separate Claude instance with its own context window, system prompt, and tool allow-list. The main agent hands it a task; it works in isolation and returns only its result — not its intermediate steps.
Two wins: context isolation (a deep read-heavy dive doesn't pollute your main thread) and parallelism (independent subagents run at once).
Creating one
Run /agents, or drop a file in .claude/agents/:
---
name: code-reviewer
description: Reviews diffs for bugs and security issues. Use after writing code.
tools: Read, Grep, Glob, Bash
model: sonnet
---
You are a meticulous senior reviewer. Cite file and line, explain the
failure, propose a fix. Prefer fewer high-confidence findings.
The description field is the trigger
Claude reads description to decide when to delegate automatically. Write it as a trigger:
- Vague:
"Reviews code."→ rarely auto-invoked. - Sharp:
"Use PROACTIVELY after any code change to review for bugs."→ invoked at the right moment.
When to delegate — and when not
- Delegate when work is independent and parallelizable (N files, N checks), needs context isolation, or benefits from a specialized persona.
- Don't when the task is small and sequential, or needs the full conversation the subagent won't have — subagents start fresh.
Now we have all four building blocks. Next: the daily-driver setup that ties them together — settings, permissions, and a status line you actually read.
Series — Agentic Workflows — Mastery
- Part 01The Agentic Workflow MindsetMost developers treat AI like a smarter autocomplete. The ones who pull ahead treat it like a teammate that acts. Here is the mental model.
- Part 02MCP Servers 101 — Give Your Agent Real ToolsThe Model Context Protocol is how your agent stops guessing and starts querying your database, your issues, your browser. Here is the mental model and the first connection.
- Part 03Build Your First Custom MCP ServerOff-the-shelf servers cover GitHub and Postgres. The high-leverage one is the server only you can write — the bridge to your own system.
- Part 04Hooks — Make the Agent Obey Your RulesA prompt asks the model to remember. A hook makes it happen — deterministically, every time, outside the model's control.
- Part 05Custom Slash Commands as Team WorkflowsA custom slash command is a reusable prompt you commit to the repo — so the whole team runs the same high-quality instruction instead of re-typing it.
- Part 06Subagents — Delegating Work That Scales — you are hereOne giant context gets slow and vague. Subagents let the main agent hand focused work to specialists with their own context and tools — and run them in parallel.
- Part 07The Daily-Driver Setup — Settings, Permissions, Status LineThe difference between fighting the agent and flowing with it is twenty minutes of configuration you do once. Here is the setup.
- Part 08Multi-Tool Pipelines — Ticket to Reviewed BranchThe payoff: chain MCP, hooks, commands and subagents into one flow that takes a ticket to a reviewed branch — with you in the loop only where it counts.