CC
Claude Code
v2.1.88
Lines of Code
0
3× Linux 1.0 kernel
Source Files
0
.ts and .tsx files
Slash Commands
0
From /compact to /stickers
Built-in Tools
0
Bash, Edit, Agent, MCP...

How to Read This Site

🚀
Quick Tour30 min4 pages

Get the big picture fast

🔬
Deep Dive2 hours7 pages

Full technical picture

🏗️
Builder's Path3 hours5 pages

For those extending Claude Code

Core Execution Loop

Deep dive →
User Input
Prompt + attachments
API Stream
Text + tool_use blocks
Tool Execution
Read=parallel, Write=serial
Permission Check
5-layer security gate
If tools called → loop again

Key Innovations

Streaming Tool Execution

TIMELINE
Model
Tool 1
Tool 2
→ tools overlap with model generation

StreamingToolExecutor queues tool_use blocks as they arrive, cutting end-to-end latency.

Zero-Cost Cache Sharing

HOW IT WORKS
Parent
10K tokens
= bytes
FREE
Child
cache hit ✓

CacheSafeParams frozen at fork time. Identical bytes = automatic prompt cache hit, making subagents nearly free.

Multi-Level Compaction

ESCALATION
Microcompact
Snipping
Autocompact
Collapse

4 escalating strategies keep conversations going indefinitely without hitting hard token walls.

Explore

By ConnectOnion

Claude Code Pattern Study & Rewrite

Your coding assistant has a duck hiding inside — from anti-ptrace defense to AI dreaming, 50 design decisions you didn't know about. By the Open-source AI Agent Framework team.