Back to directory

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.

Yuyu: Decoding the Agent Harness

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.

More in Coding agents

See all 793
  • The City

    github.com

    A native macOS app that shows Claude Code runs as a city, with each project as a building, each team as a floor of robots, and every animation driven by a real event from the claude CLI's stream.

  • rig

    tryrig.ai

    A small, single-binary agent runtime that points at any OpenAI-compatible model, local or hosted, reads and edits a repository's code, runs its tests and remembers what it learned, with a loop implemented in a few hundred lines.

  • Jauvex

    jauvex.reindent.com

    An Electron desktop app that puts Claude Code, Codex and Grok coding-agent sessions side by side and lets you steer them by voice, with a small model handling fast routing decisions.