Claude Code's source code leaked, and the internals reveal a more complex system than Anthropic has disclosed. The core is an agentic loop: Claude receives system and user context, selects tools, executes them, and feeds results back into the next iteration. Permissions are layered, with sub-agents spawned for parallel or delegated tasks, each operating under their own permission scope.
The unreleased features are the real story. The leak exposes a 'Buddy' feature for collaborative sessions, an 'Away Summary' that recaps activity during idle periods, and 'Auto Dream', a background memory consolidation system that writes compressed context back into Claude's working memory without user prompting. Future server-side tools and API expansions are also stubbed out in the code.
Read the full breakdown for the tool execution model and multi-agent workflow architecture. The permission layering between parent and sub-agents is the part that explains behaviors most users chalk up to inconsistency. The Auto Dream memory system alone changes assumptions about how stateless these sessions actually are.
[WATCH ON YOUTUBE →]