The Five-Layer Harness That Makes Claude Code Work at Million-Line Scale
Most teams treat Claude Code as a model-upgrade problem, but at scale the bottleneck is the harness that gives the agent navigational context and tool access. Skipping the five-layer setup means context windows burn on blind exploration, and without an agent manager the configuration rots as the codebase evolves.
Claude Code navigates the file system directly instead of relying on stale RAG indexes, but blind searching exhausts its context window fast. The fix is a five-layer harness that provides direction, prevents errors, loads specialized knowledge on demand, packages configurations for distribution, and connects to external tools like Jira and CI/CD. Two auxiliary capabilities—LSP for semantic code understanding and Subagents for parallel task decomposition—further extend what the agent can handle without blowing up the context budget.
Three configuration patterns emerge from successful large-scale deployments: keep CLAUDE.md concise and layered so the agent always knows where to look, review and prune configuration rules every three to six months as models improve, and assign a dedicated agent manager to maintain the toolchain. Without this role, CLAUDE.md bloats, Skills fragment, and Hooks conflict.
Six engineering trade-offs define the architect's job: commit fully to file-system navigation instead of hedging with RAG, treat CLAUDE.md as a fixed overhead to minimize, use Hooks for continuous learning rather than just guardrails, size Skills around identifiable work scenarios, restrict MCP connections to data sources directly relevant to code changes, and mandate an agent manager once the user base crosses roughly 50 developers.
Anthropic's five-layer prescription reframes Claude Code from a model product into a systems-integration problem—the model is the engine, but the harness is the chassis and navigation.
The insistence on a dedicated agent manager role mirrors the historical emergence of SRE and data-governance leads: new tool paradigms create new operational roles, and teams that skip this step hit a chaos ceiling around 50 users.
Progressive disclosure in Skills is a context-window optimization disguised as a knowledge-management pattern—its real job is preventing the fixed overhead of CLAUDE.md from ballooning into variable overhead.
The advice to prune CLAUDE.md as models improve inverts the typical assumption that configuration only accumulates; stronger models can make old rules actively harmful by constraining capabilities that no longer need hand-holding.
Recommending subdirectory startup rather than monorepo-root startup is a cheap architectural lever that shrinks the search space before the agent even runs, yet most teams never think to do it.