DEV Community

Cover image for Claude Code Internals
Vlad Arbatov (vladzima)
Vlad Arbatov (vladzima)

Posted on

Claude Code Internals

Since Claude Code full source leaked, i went ahead and created deep technical documentation of CC's architecture and internals, derived from analysis of 1,884 files and 512k lines of TypeScript. Should be useful to anyone touching CC as a tool in their pipeline.

HERE >>>

It has 8 sections:
Architecture Overview
Entry points, data flow, module graph, config, process model, state

Query Engine
Conversation loop, streaming, token management, error recovery, compaction

Tool System
Tool interface, registry, execution lifecycle, permissions, deferred tools

Agent & Coordinator
Subagents, coordinator mode, isolation, fork protocol, task management

MCP Integration
Server lifecycle, tool proxying, OAuth, resources, elicitation

Context & System Prompts
Prompt assembly, CLAUDE.md, auto-memory, git context, compression

Hooks, Skills, Permissions
Hook events, skill format, permission modes, sandbox, denial tracking

Server, Bridge, Remote
Server mode, bridge protocol, CCR, WebSocket, cron, state management

Top comments (0)