Claude Code Decomposition Pattern

The practice of structuring work for Claude Code as multiple phases or parallel sub-agents instead of one monolithic prompt. The leaked source code reveals a coordinator subsystem, agent tools, team tools, and background task support designed for splitting work across agents. Typical phases: search, plan, execute, verify. Alternatively, parallel sub-agents handle code exploration, implementation, and test validation simultaneously.

Key points

  • Source code reveals coordinator, agent, team, and background task subsystems
  • Typical serial decomposition: search -> plan -> execute -> verify
  • Parallel decomposition: one sub-agent explores code, another implements, another validates tests
  • Sub-agents have their own context window (pro: clean isolation, con: 7-10x token cost)
  • Sub-agents can use different models (cheaper Haiku for research, Opus for synthesis)
  • Better results than monolithic prompts like 'refactor the entire module and fix the tests'
  • Skills can delegate to sub-agents by name with specific models

Related entities

Related concepts

Source references

  • [src-004] Nate Herk cluster — Nate Herk — Claude Code cluster (21 videos)

– Videos referenced: tXtCK66fPj8, zKBPwDpBfhs, mi4hcipESKQ, 49V-5Ock8LU

Robin Cartier perspective

This page is part of Robin Cartier's working AI knowledge graph: a practical research layer for production AI, recommendation systems, experimentation, GEO, and agentic web readiness.

The useful next step is to connect this concept back to applied product leadership and operating models.

Recommended next

Keep reading from this thread

From 500 indexed pages and articles.

  1. Wiki concept Claude Code Plan Mode and Ultra Plan A Claude Code execution mode where the agent maps out the full approach before touching files, asking clarifying questions Related by plan
  2. Wiki concept Claude Code Dynamic Workflows A high-parallelism orchestration mode introduced alongside Claude Opus 4 8, where Claude generates an executable JavaScript workflow Related by sub
  3. Wiki concept Session Chaining The practice of decomposing a large project into a sequence of specialised Claude Code sessions — discovery, planning, execution — where each session's output Related by decomposition