Summary
Part I: Architecture — How Claude Code Works
- Chapter 1: The Full Tech Stack of an AI Coding Agent
- Chapter 2: Tool System — 40+ Tools as the Model's Hands
- Chapter 3: Agent Loop — The Full Lifecycle from User Input to Model Response
- Chapter 4: Tool Execution Orchestration — Permissions, Concurrency, Streaming, and Interrupts
- Chapter 4b: Plan Mode — From "Act First, Ask Later" to "Look Before You Leap"
Part II: Prompt Engineering — System Prompts as the Control Plane
- Chapter 5: System Prompt Architecture
- Chapter 6: Steering Behavior Through Prompts
- Chapter 6b: API Communication Layer — Retry, Streaming, and Degradation Engineering
- Chapter 7: Model-Specific Tuning and A/B Testing
- Chapter 8: Tool Prompts as Micro-Harnesses
Part III: Context Management — The 200K Token Arena
- Chapter 9: Automatic Compaction — When and How Context Gets Compressed
- Chapter 10: File State Preservation After Compaction
- Chapter 11: Micro-Compaction — Precise Context Pruning
- Chapter 12: Token Budgeting Strategies
Part IV: Prompt Caching — The Hidden Cost Optimizer
- Chapter 13: Cache Architecture and Breakpoint Design
- Chapter 14: Cache Break Detection System
- Chapter 15: Cache Optimization Patterns
Part V: Safety and Permissions — Defense in Depth
- Chapter 16: Permission System
- Chapter 17: YOLO Classifier
- Chapter 17b: Prompt Injection Defense — From Unicode Sanitization to Defense in Depth
- Chapter 18: Hooks — User-Defined Interception Points
- Chapter 18b: Sandbox System — Multi-Platform Isolation from Seatbelt to Bubblewrap
- Chapter 19: CLAUDE.md — User Instructions as an Override Layer
Part VI: Advanced Subsystems
- Chapter 20: Agent Spawning and Orchestration
- Chapter 20b: Teams and Multi-Process Collaboration
- Chapter 20c: Ultraplan — Remote Multi-Agent Planning
- Chapter 21: Effort, Fast Mode, and Thinking
- Chapter 22: Skills System — From Built-In to User-Defined
- Chapter 22b: Plugin System — From Packaging to Marketplace Extension Engineering
- Chapter 23: The Unreleased Feature Pipeline — The Roadmap Behind 89 Feature Flags
- Chapter 24: Cross-Session Memory — From Forgetfulness to Persistent Learning
Part VII: Lessons for AI Agent Builders
- Chapter 25: Harness Engineering Principles
- Chapter 26: Context Management as a Core Capability
- Chapter 27: Production-Grade AI Coding Patterns
- Chapter 28: Where Claude Code Falls Short
- Chapter 29: Observability Engineering — From logEvent to Production-Grade Telemetry
- Chapter 30: Build Your Own AI Agent — From Claude Code Patterns to Practice