Compound engineering with Claude Code: chaining agents that ship
TL;DR
- Compound engineering Claude Code is a 4-step loop (Plan / Work / Review / Compound) where each session writes its learnings back into CLAUDE.md.
- The compounding effect reduces repeated mistakes across sessions and shortens cold-start ramp-up time.
- The Every Inc. open-source plugin ships 36 skills and 51 agents to automate the loop inside Claude Code, Cursor, and Codex (released December 2025).
- A DIY version requires nothing beyond a CLAUDE.md file and a consistent Review discipline.
- The main unsolved problems in 2026 are stale memory cleanup and cross-project knowledge transfer.
Compound engineering Claude Code is a structured method for turning successive Claude Code sessions into a self-improving workflow rather than a series of disconnected one-shot prompts. The concept was formalized by Every Inc. on December 11, 2025: each session must produce a written artefact (a set of CLAUDE.md updates) that feeds the next session.
The compounding effect is measurable. A CLAUDE.md that captures project-specific patterns reduces repeated mistakes and cuts cold-start ramp-up time in ways that context window size alone cannot replicate. This article covers how the loop works, where the memory lives, how to install the Every Inc. plugin, and what the methodology still lacks heading into mid-2026.
What the compound engineering loop actually does
The loop runs in four named phases.
Plan. Before any code runs, you or the agent produces a brief task spec: which files change, what constraints hold, which tests must pass. This document scopes the Work phase and provides a reference for the Review.
Work. Standard Claude Code execution, constrained by the Plan. No structural difference from a regular session, except that scope drift is easier to detect and correct against a written spec.
Review. After the Work phase, the agent audits what happened. The output is not a pull-request review. It is a retrospective: which assumptions were wrong, which project-specific patterns had to be inferred from context, which edge cases were unhandled. This phase generates the raw material for the final step.
Compound. The lessons from Review are written back into CLAUDE.md. Specifically: patterns to follow, anti-patterns to avoid, and conventions the code does not make explicit.
The compound engineering Claude Code methodology was described by Every Inc. as the difference between using an AI assistant and training an AI collaborator on your specific codebase. The contrast with a standard AI coding loop is structural: in one-shot prompting, every session starts from zero. In a compound loop, the context grows session by session. After 10 to 15 sessions, CLAUDE.md encodes enough codebase-specific knowledge that a cold-start session behaves like a warm one.
CLAUDE.md and AGENTS.md: where the compounding actually lives
The compounding effect is only as durable as the file that stores it. Claude Code reads CLAUDE.md at the start of every session. Codex reads AGENTS.md. Both are plain-text Markdown files: human-readable, version-controlled, incrementally updated.
A CLAUDE.md starts sparse. Under a consistent memory-backed coding pipeline workflow, it grows to roughly 200 to 400 lines over four to six weeks. Each line corresponds to a specific lesson from a Review step. Lines that prove wrong or redundant get pruned in subsequent Compound steps.
A mature CLAUDE.md typically holds:
- Naming conventions that diverge from language defaults
- Known pitfalls for the project's specific dependency versions
- Anti-patterns the agent has attempted and abandoned, with a brief note why
- Test conventions including prohibited mock strategies
- Deployment constraints (what requires a migration, what constitutes a breaking change)
One concrete data point from the Every Inc. methodology: a CLAUDE.md growing from blank to approximately 400 lines over 4 to 6 weeks of consistent Review and Compound steps correlates with measurably fewer repeated errors compared to early-session baselines. The ramp-up tax shrinks because the agent does not have to re-infer what it already learned in session three.
Compound engineering Claude Code with the Every Inc. plugin
The Every Inc. team open-sourced their implementation on GitHub in December 2025. The EveryInc/compound-engineering-plugin ships 36 skills and 51 agents as of April 2026, targeting Claude Code as its primary runtime with additional support for Cursor and Codex. The skills map directly onto the four loop phases: Plan generates a structured task spec, Review runs the automated retrospective, Compound writes the CLAUDE.md delta. Plan, Review, and Compound are active by default. Work skills wrap your existing coding workflow rather than replacing it.
Installing in 3 commands
git clone https://github.com/EveryInc/compound-engineering-plugin
cd compound-engineering-plugin
./install.sh --target claude-code
The install script copies skill definitions into your project's .claude/ directory and appends a reference block to CLAUDE.md. No external service or additional API key is required beyond your existing Claude Code access.
Which agents matter most for a solo developer
For solo use, three agents deliver most of the leverage: compound-review (runs a session retrospective and outputs CLAUDE.md additions as a diff), compound-compound (applies the diff and commits the update), and compound-plan (generates a structured spec from a plain-language intent before any code runs).
The remaining 48 agents address team workflows, shared memory reconciliation between divergent CLAUDE.md branches, and editor integrations. Useful at scale, not critical for a single-developer chained agent sessions setup.
A DIY compound loop without the plugin
For teams that want full control over what enters CLAUDE.md, a minimal iterative AI automation loop using only Claude Code native features is workable.
- Start each session with
/initif CLAUDE.md does not yet exist. Otherwise, read the existing file as the first context block. - Write a two-sentence Plan before any tool calls: what changes, and why.
- At the end of the Work phase, prompt explicitly: "List three project-specific patterns you had to infer that should be explicit. List one anti-pattern you considered and discarded."
- Paste the output into CLAUDE.md and commit it alongside the code change.
The heuristic that makes this multi-step agent cycle sustainable: each Review step should add two to three lines to CLAUDE.md, not a paragraph. Over-appending creates a file that is costly to inject. Under-appending means the compounding never accumulates meaningful signal.
At approximately $0.003 per 1,000 tokens on Claude Sonnet 4, a 500-line CLAUDE.md is not free. A periodic pruning session (a session whose sole purpose is removing stale or redundant entries) keeps the file below 400 lines and is cost management as much as information hygiene.
Committing CLAUDE.md to version control enables team-level compounding: every contributor's sessions benefit from the shared memory rather than each maintaining a private copy. This creates a kind of mémoire collective where the whole team learns from individual discoveries.
Compound engineering in 2026: adoption, forks, and what is still missing
The Every Inc. plugin shipped December 11, 2025. By April 2026, the repository had reached 36 skills and 51 agents, with community forks adapting the skill format to VS Code Copilot Chat and Zed. Cursor and Codex support was present from launch. Committing CLAUDE.md to version control became the recommended default in the plugin documentation by early 2026, reflecting a shift from solo workflows toward team-level compound engineering Claude Code practices.
Three adoption patterns stand out heading into mid-2026. Teams that commit CLAUDE.md to version control get team-level compounding where every contributor's sessions build on a shared memory rather than diverging copies. Forks that inject domain-specific Review prompts (embedded systems, data pipelines, regulated environments) produce higher-signal Compound steps than the generic defaults. And pre-commit or post-commit hooks that trigger compound-review automatically remove the main failure mode of the methodology: skipping the Review step when a session ends under time pressure.
What the tooling still does not solve:
| Gap | Description |
|---|---|
| Cross-project compounding | A pattern learned on project A does not propagate to project B, even for the same developer |
| Stale memory cleanup | A CLAUDE.md entry written in January 2026 may be wrong by June 2026 if dependencies changed |
| Chunked injection | Loading only the CLAUDE.md sections relevant to the current task rather than the entire file |
Chunked injection is discussed in several forks but not yet merged into the main plugin. Until it is, very large CLAUDE.md files impose a per-session token cost that scales linearly with file length. Which honestly gets expensive fast 💸
Key takeaways
Compound engineering Claude Code turns a stateless prompt executor into a project-aware agent by persisting session learnings in CLAUDE.md. The compounding effect scales with consistency in the Review and Compound steps, not with context window size. The Every Inc. plugin automates the loop with 36 skills and 51 agents as of April 2026. Without it, a disciplined CLAUDE.md commit habit produces the same outcome at the cost of more manual effort.
The main open problem is stale memory, not missing tooling. But that's a problem worth solving because the alternative (starting from scratch every session) is just wasteful at this point.
The compound engineering loop (Plan, Work, Review, Compound) turns each Claude Code session into a learning that feeds the next one, and it lives entirely in CLAUDE.md. The production CLAUDE.md template in the welcome kit shows exactly how to structure it so your agent doesn't repeat the same mistakes across sessions.