Sub-agents let Claude Code run multiple specialized agents in parallel — one searching the codebase, another writing tests, another refactoring. This guide covers when to use them, the Task tool patterns, and the workflows that 3x output.
Claude Code can run $300–500/month per heavy user on the API. These 7 strategies — model routing, prompt caching, context pruning, sub-agent discipline — cut our bill from $480 to $128/month with no quality drop.
Build a working multi-agent system in Python — a coordinator agent delegates to specialized workers, handles failures, and synthesizes results. Complete code, real examples, no framework lock-in.
Claude Code hooks let you trigger custom scripts before and after AI actions — auto-lint on save, run tests before commits, deploy on merge. Here's how to set them up.