The 4 foundational files that power Claude Code. Each one is its own deep-dive page.
The Entry Point
CLI bootstrap, React/Ink rendering, parallel pre-loading, feature gating. Where 'claude' starts executing.
The Brain
Manages the full query lifecycle: API conversations, tool orchestration, permissions, token tracking, message history.
Execution Loop
The main conversation loop: construct messages, check token budget, call API, stream response, execute tools, repeat.
Tool Interface System
Defines how all 45+ tools work: the Tool type, permission modes (Default/Auto/Bypass), execution interface.