A walkthrough of Claude Code's sub-agent and git worktree features for running parallel AI coding tasks. Sub-agents get their own context windows and tools, keeping the main agent's context clean — built-in sub-agents include 'explore' (uses Haiku) and 'plan'. Custom agents are created via markdown files with YAML front matter (name and description required) in a .claude/agents folder. Worktrees are used for divergent experiments across separate git branches — demonstrated by scaffolding a FastAPI backend with both SQLite and PostgreSQL in parallel to compare trade-offs. Key guidance: use sub-agents for same-branch parallel tasks, use worktrees when you need separate git branches or want to explore divergent implementations.
•33m watch time
127 Impressions