Claude Code Architecture
A 6-part series on agentic system design, learned from Claude Code
All Parts
How Claude Code's Architecture Works (Part 1) — 5 Layers You Can Steal for AI Agents
Discover Claude Code's five-layer architecture and design principles. Learn the ReAct pattern, context management, and design patterns you can steal for your own AI agents.
How Claude Code's Master Loop Works (Part 2) — The Simple Pattern That Beats Complex Frameworks
Why Claude Code's simple while-loop beats complex graphs. Learn the master loop pattern, streaming, async queues, and how simplicity wins in production.
How Claude Code's Tool Layer Works (Part 3) — Designing the Agent's Hands
How Claude Code's tool layer turns LLMs into agents that act. Learn tool design patterns, MCP integration, sandboxing, and principles for building your own.
How Claude Code's Memory System Works (Part 4) — What Agents Remember and Why It's Hard
Three memory problems every agent must solve: short-term state, long-term knowledge, and context windows. Learn Claude Code's elegant solutions.
How Claude Code's Extension System Works (Part 5) — Skills, Commands, and Subagents
Why one extension mechanism isn't enough. Learn the three ways Claude Code extends agent capabilities and when to use each one.
How Claude Code's Safety Model Works (Part 6) — Patterns to Steal for Your Own Agentic System
The complete playbook: Claude Code's 4-layer safety model and 10 design patterns you can steal for your own agentic system. The series finale.
Building a Travel Agent: Applying Claude Code's Design Patterns to a Real System
A practical guide to building an autonomous travel planning agent in TypeScript — applying every design pattern from the Claude Code series to a real React/Ink TUI that runs on Claude, Gemini, or Ollama.