WanLanglin/-awesome-cc-harness
57 stars · Last commit 2026-05-01
Reverse-engineering Claude Code's 512K LOC TypeScript source: agent loop, tool system, permission model, Grove training pipeline, anti-distillation defense
README preview
# awesome-cc-harness [](https://github.com/WanLanglin/-awesome-cc-harness/stargazers) [](LICENSE) [](https://wanlanglin.github.io/-awesome-cc-harness/zh/) [](https://wanlanglin.github.io/-awesome-cc-harness/en/) ## English (TL;DR) > **Reverse-engineering all 512,664 lines of Claude Code's TypeScript source** — agent loop, tool system, permission model, sandbox, context engineering. A 16-chapter textbook (~50,000 words, 147 code blocks, 77 diagrams) on how Anthropic actually builds an agent harness. > 📣 **Featured in Chinese AI media** — Republished by [QingkeAI (青稞AI)](http://mp.weixin.qq.com/s?__biz=MzI1MzEwMzIwOQ==&mid=2247513815&idx=1&sn=bfa7e1a0c0accdb65d1def80d6b28be7) and other WeChat publications, with **20,000+ reads** and **2,000+ shares**. [Original Chinese article](https://mp.weixin.qq.com/s/WiE6w5ORTBoh5ggLlkQr9g). **Two findings you won't see elsewhere:** - 🔬 **[Grove](https://wanlanglin.github.io/-awesome-cc-harness/en/#grove-system)** — Anthropic's hidden training-data pipeline. Retention jumps **30 days → 5 years** when enabled. 796 telemetry events flow into BigQuery columns the source code labels *"training data"*. - 🛡️ **[Anti-Distillation](https://wanlanglin.github.io/-awesome-cc-harness/en/#anti-distillation)** — 5-layer defense: native client attestation, request fingerprinting, fake-tool injection, signature-bound thinking blocks, "distillation-resistant" streamlined output. 👉 **[Read the full English version online](https://wanlanglin.github.io/-awesome-cc-harness/en/)**