Use Claude Code's Agent Teams feature to decompose a complete feature into 4 parallel workstreams — database schema, backend API, frontend component, and tests — each running in an isolated Git worktree simultaneously. A lead agent coordinates the parallel execution, manages inter-agent dependencies, resolves merge conflicts, runs the /loop automation until all tests are green, and generates the final PR. The CLAUDE.md architecture file is the control surface that makes every session reliable and every future feature faster.
1–2 full development days compressed to 2–4 hours per complete feature
Engineering
Claude Code
Claude Code desktop app installed on macOS or Windows (Agent Teams and parallel Git worktrees are not available on Linux — use CLI with sequential worktrees instead); CLAUDE.md file written, reviewed, and committed to repository root before starting; GitHub fine-grained PAT with pull_requests:write and contents:write scopes set to 2-hour expiry; MCP v2.1 configured with read/write database credentials scoped to feature-specific tables only (never admin privileges); existing test suite with at least 60% coverage before any agentic work; clean Git state (no uncommitted changes) before the lead agent starts
Before approving the PR, review the interface contract file (types/[feature_name]-contract.ts or equivalent) first — this file is where sub-agent assumptions surface and is the most common source of post-merge failures. Then review each workstream diff independently before reviewing the merged result. Run the integration test suite on a clean database seed, not your development database. Confirm no workstream modified files outside its designated scope (this should be caught by the lead agent but verify independently). Finally, check the NEVER DO section of your CLAUDE.md and confirm none of those operations were performed.
Agent Teams and Git worktrees require the Claude Code desktop app — not available on Linux; Linux users must run sub-agents sequentially in separate terminal sessions. The /loop feature must never be configured to run autonomously on migrations, authentication code, or billing logic — documented production incidents exist from loops that entered infinite regression cycles on these sensitive operations. Token consumption scales linearly with parallel sub-agents: 4 parallel agents consume approximately 4x the tokens of a single session; monitor usage on Pro plans. Sub-agents do not share live memory — the interface contract file pattern in Step 5 is not optional; skip it and sub-agents will make incompatible assumptions about the API shape. The CLAUDE.md file is the single most important prerequisite: running this workflow without a well-structured CLAUDE.md produces unpredictable results; running it with a mature CLAUDE.md consistently delivers production-quality features.
Stack: Claude Code desktop app (4 parallel sessions, each auto-creating its own Git worktree), CLAUDE.md (standing architecture instructions), /loop slash command (automated test cycle), MCP v2.1 (scoped database access), GitHub fine-grained PAT (PR creation). Key correction most tutorials get wrong: "Agent Teams" in Claude Code means you open parallel sessions in the desktop app and direct each one — you are the human orchestrator. Fully automated lead-agent-spawns-sub-agents orchestration requires writing an Agent SDK coordinator script (TypeScript or Python). For most teams, 4 manual parallel sessions is faster to set up, easier to monitor, and produces better results than automated orchestration on the first few runs. The CLAUDE.md is not configuration — it is the architectural briefing you would give a new senior engineer on their first day. Treat it that way.