
Claude Code's Entire Source Code Just Leaked — 512,000 Lines Exposed
This morning, the AI community woke up to a bombshell: Claude Code's entire source code was exposed on GitHub. Not a snippet. Not a partial leak. All 512,000 lines. 1,900 files. Complete TypeScript source. How It Happened March 31, 2026. Security researcher Chaofan Shou posted on X: "Claude code source code has been leaked via a map file in their npm registry!" A single .map file. That's all it took. Source maps are debugging tools that map compiled code back to original source. They're supposed to stay in development environments only. Anthropic accidentally bundled it into their production npm package. The .map file referenced an R2 storage bucket URL. Click it. Complete, unobfuscated, commented TypeScript source code. Ready to download. What Was Exposed This is the complete source code of a production-grade AI coding tool. Scale: 1,900 files 512,000+ lines of code Strict TypeScript Bun runtime React + Ink terminal UI Core files: QueryEngine.ts: 46,000 lines — entire LLM API engine,
Continue reading on Dev.to
Opens in a new tab




