Latent Space Breaks Down Claude Code Architecture
Swyx's deep dive into the leaked Claude Code source surfaces the engineering details competitors will study hardest. The memory system runs three layers - a MEMORY.md index, on-demand topic files, and searchable session transcripts - with an autoDream mode that consolidates memory during idle periods. Subagents use KV cache forking for parallel processing with full context inheritance, making concurrent operations nearly free. The default tool count is under 20 but expandable to 60+, and a five-level permission system governs execution. Unreleased internal features include ULTRAPLAN and KAIROS. Attackers moved fast too - malicious npm packages targeting developers trying to compile the leaked source appeared within hours. The leak has effectively turned Claude Code's harness architecture into a public reference implementation for every team building coding agents.