Yuyu: Decoding the Agent Harness
A 15-chapter Chinese-language technical book that reverse-engineers Claude Code's architecture, covering its conversation loop, tool system, permission pipeline, memory, context management, sub-agents and MCP integration.
This book is an independent technical analysis of Claude Code's architecture, not an official publication, covering the conversation loop that drives an agent's turn-by-turn execution, the tool system and its safety-first factory pattern, a four-stage permission pipeline, and configuration layering. A second part covers core subsystems: settings, a memory system built around saving only information that cannot be re-derived, context management with staged compaction, and a hook system with lifecycle events and a JSON response protocol.
A third part covers composition and extension, including sub-agents and the fork pattern for inheriting context, a coordinator pattern for multi-agent orchestration, the skills and plugin architecture, and MCP integration and bridging. A final part covers streaming architecture and performance, plan mode and structured workflows, and a roadmap for building a custom agent harness from scratch, with four appendices covering an architecture map, a full tool reference, feature flags and terminology.