Skip to content
Flows
Tier 1 · Claude Code internals Claude Code internals · fetched 2026-07-02

Claude Code Orange Book

A book-length analysis ('Orange Book') dissecting Anthropic's AI engineering decisions from the 510,000 lines / 1,902 TypeScript files that shipped inside an npm package. Chapters cover the agent loop, context compaction, the hook system, and sub-agents - the concepts, not just the code.

View source on GitHub

Key takeaways

  • 01

    Agent loop, compaction, hooks, and sub-agents each get chapter-level treatment

  • 02

    Frames every mechanism as an engineering decision with trade-offs

  • 03

    Best source for architecture diagrams' underlying concepts

Flows built on this research