ARCHITECTURE_SIMULATOR
SIMULATOR
Step-by-step interactive simulations of Claude Code's internal architecture. Each tutorial visualizes a different subsystem — watch data flow through the query loop, permission pipeline, tool registry, and streaming renderer in real time.
Select a simulation below to launch the interactive viewer.
01
Boot Sequence
/tutorials/01-boot-sequence
What happens when you type "claude" — from module load through parallel prefetch to the blinking cursor.
LAUNCH
02
Send a Message
/tutorials/01-the-repl-loop
Follow a user message from keystroke to streaming response — the core request/response lifecycle.
LAUNCH
03
Tool Execution
/tutorials/03-tool-execution
Watch the permission pipeline evaluate a tool call — from API response through deny rules, mode checks, and ML classifiers to execution.
LAUNCH
04
Streaming-First API
/tutorials/04-streaming-api
Watch tokens flow from API to terminal — see how tool_use blocks are detected mid-stream and executed concurrently.
LAUNCH
05
Permission Pipeline
/tutorials/05-permission-pipeline
Watch a dangerous command flow through the 4-stage permission pipeline — deny rules, mode checks, ML classifier, and interactive approval.
LAUNCH
06
MCP Server Connection
/tutorials/06-mcp-connection
Watch an MCP server connect — from config loading through transport handshake to tool discovery and registry merge.
LAUNCH
07
Context Compaction
/tutorials/07-context-compaction
Watch auto-compaction trigger when context pressure hits 92% — a forked agent summarizes the conversation and memory is extracted.
LAUNCH
08
Context & Memory Assembly
/tutorials/07-context-memory
Watch the full context assembly pipeline — from git status and CLAUDE.md loading to system prompt construction and background memory extraction.
LAUNCH
09
React in Terminal
/tutorials/08-terminal-ui
See how React components render in the terminal — from JSX through Ink reconciler and Yoga layout to ANSI escape codes.
LAUNCH
10
Multi-Agent Coordination
/tutorials/09-multi-agent
Watch the coordinator spawn parallel research workers, synthesize findings, then dispatch an implementation worker — full multi-agent orchestration.
LAUNCH