Source Code Analysis: ~512,000 lines of TypeScript
Claude Code
Internals
Everything about how Claude Code works, extracted directly from the source code and explained for everyday users.
~1,884 TypeScript files
45 Built-in tools
6 Agent types
200K Context tokens (default)
Explore all sections
01 6 layers
System Prompt
Modular prompt hierarchy and key rules
Read more
02 45 tools
Tools
45 built-in tools by category
Read more
03 6 agents
Agents
6 built-in agent types and capabilities
Read more
04 4 types
Memory
Persistent memory across sessions
Read more
05 6 modes
Permissions
6 modes and the YOLO 2-stage classifier
Read more
06 200K tokens
Context & Compaction
Token budget, auto-compact, output limits
Read more
07 4 models
Costs
Pricing per model and the /fast mode trap
Read more
08 10 retries
Retry Logic
Exponential backoff and error handling
Read more
09 KAIROS
Proactive Mode
KAIROS autonomous mode and tick prompts
Read more
10 10+ flags
Hidden Features
Feature flags and undocumented capabilities
Read more
11 10 tips
Practical Tips
Top 10 tips derived from the source code
Read more