A 420K-Word X-Ray of Claude Code's Agent Harness
A systematic architectural autopsy that reverse-engineers Claude Code's runtime from public behavior—teaching you how production agents are built, not merely used.

What it does
This repository hosts a Chinese-language technical book (with an English edition) that maps the skeleton of Anthropic’s Claude Code. Across fifteen chapters and four appendices, it analyzes the Agent Harness—the runtime that orchestrates conversation loops, tool systems, permission pipelines, and context compression—using only public documentation and observable product behavior. It is explicitly not a prompt-engineering tutorial or API quickstart.
The interesting bit
The book was catalyzed by a March 31, 2026 disclosure of a build-configuration error in the npm registry, which the authors say triggered industry-wide demand for systematic agent internals. Rather than exploit leaked code, they reconstructed the architecture from the outside in, producing 139 Mermaid diagrams and cataloguing 89 feature flags, 50-plus tools, and 100 terminology entries as an open-source forensic report.
Key highlights
- 139 Mermaid diagrams covering conversation loops, memory systems, MCP integration, and Plan-mode workflows.
- Deep dives into 50-plus design decisions, including why the permission pipeline uses four stages and why context compression employs four tiers.
- A six-step roadmap in the final chapter for building your own harness from scratch.
- Four appendices that serve as a field manual: module navigation maps, tool taxonomies, feature-flag cross-references, and bilingual terminology.
- Explicitly disclaims use of proprietary or unauthorized source code; derived from public docs and product behavior only.
Caveats
- The English edition clocks in at 75K+ words versus 420K Chinese characters, suggesting the Chinese text carries the primary depth.
- Licensed under CC BY-NC-SA 4.0, so commercial reuse and closed derivatives are prohibited.
- At 420,000 words, it is a reference tome, not a weekend skim; the authors budget roughly two to three weeks for a systematic read with exercises.
Verdict
Worth bookmarking if you design agent frameworks, write orchestration logic, or are simply tired of tutorials that stop at the API surface. Skip it if you are hunting for prompt cheatsheets or a quick “Hello, Claude Code” starter.
Frequently asked
- What is lintsinghua/claude-code-book?
- A systematic architectural autopsy that reverse-engineers Claude Code's runtime from public behavior—teaching you how production agents are built, not merely used.
- Is claude-code-book open source?
- Yes — lintsinghua/claude-code-book is an open-source project tracked on heatdrop.
- How popular is claude-code-book?
- lintsinghua/claude-code-book has 4k stars on GitHub and is currently cooling off.
- Where can I find claude-code-book?
- lintsinghua/claude-code-book is on GitHub at https://github.com/lintsinghua/claude-code-book.