Claude Code Subagents and Hooks
Run a Multi-Agent Dev Team, Stop Token Burn, and Ship PRs 2x Faster
You spawn subagents and they burn 85% of your tokens cold. This ships the working stack: a three-agent dev team, five hooks, worktree isolation, a kill switch, and the settings.json that cuts your token bill 30%.
Turn Claude Code from a smart autocomplete into your own dev team. A small multi-agent stack (planner, coder, reviewer), five hooks that catch silent failures, worktrees that keep parallel workers from clobbering your repo, a kill-switch hook, and the cost routing that drops your token bill 30%. 190 pages of operator discipline, not a 500-page recipe dump.
What You'll Build
The gap between chat-box autocomplete and a multi-agent dev team.
What each of the four primitives is and what context it carries.
The four-axis filter that stops you defaulting to a subagent.
Install a working planner, coder, reviewer stack on your own repo.
The four-field briefing that stops cold subagents from guessing.
Wire a SubagentStop hook and watch every subagent in real time.
Git worktree isolation so workers never overwrite each other.
One skill, three subagents, one hook, wired into an issue-to-PR pipeline.
Route workers to cheap models and cut the subagent line item 30%.
Three gates and a kill-switch hook that catch the runaway before it ships.
The Goldilocks Test that retires agents that don't earn their slot.
A signed 30-day plan from chat-box habit to multi-agent workflow.
Free Articles from this Book
Claude Code Hooks: Wire a SubagentStop Hook
Wire a Claude Code SubagentStop hook to a log file and tail it live, so you catch hung, runaway, and suspiciously-fast subagents before they ship bad code.
from: Claude Code Subagents and Hooks
Run Claude Code Subagents in Parallel Without Clobbering
Multi-agent development with Claude Code clobbers files when workers share a checkout. Use git worktree isolation and claude --bg to fan out workers safely.
from: Claude Code Subagents and Hooks
Set Up Claude Code Subagents: Three, Not Forty-Seven
Install Claude Code subagents the right way: three scoped agents (planner, coder, reviewer) wired to a main-thread planner, running end-to-end on your repo.
from: Claude Code Subagents and Hooks
Why Claude Code Subagents Burn So Many Tokens
Claude code subagents cost up to 85% of a heavy session. Route workers to cheaper models, audit the env var that undoes it, and cut the subagent bill 30%.
from: Claude Code Subagents and Hooks
Tool, Skill, or Subagent? The Claude Code Decision
Stop defaulting to a subagent. A four-axis Claude Code framework routes logic to an inline prompt, a tool call, a skill, or a subagent by cold-start cost.
from: Claude Code Subagents and Hooks