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

[![GitHub stars](https://img.shields.io/github/stars/WanLanglin/-awesome-cc-harness?style=social)](https://github.com/WanLanglin/-awesome-cc-harness/stargazers)
[![License](https://img.shields.io/badge/License-All%20Rights%20Reserved-red.svg)](LICENSE)
[![中文](https://img.shields.io/badge/语言-中文-blue.svg)](https://wanlanglin.github.io/-awesome-cc-harness/zh/)
[![English](https://img.shields.io/badge/Language-English-green.svg)](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/)**

View full repository on GitHub →