Claude Code source code leaks via a source-map file in the npm package
On March 31, 2026 Anthropic accidentally published the full Claude Code source, more than 512,000 lines of TypeScript in about 1,900 files, inside npm package v2.1.88 through a 59.8 MB source-map file. The leak exposed unreleased feature flags, including an always-on background agent called KAIROS. Anthropic called it a packaging error caused by human error, not a security breach.
Key facts
- Date: March 31, 2026; @anthropic-ai/claude-code v2.1.88 shipped cli.js.map (59.8 MB)
- 512,000+ lines of TypeScript across 1,906 files; 44 hidden feature flags reported
- Discovered by security researcher Chaofan Shou; post reportedly drew 16–21M views
- GitHub disabled more than 8,100 mirror repositories
What happened
The root cause was reportedly a missing *.map exclusion in .npmignore. The leak revealed upcoming features and model references. Anthropic pulled the package.
Why it matters
It was a rare look at the internals of the most widely used AI coding agent. It came days after the Mythos draft leak (Mar 26) and raised questions about Anthropic's operational security.
Changelog
- 2026-09-29: created
Related events
- Anthropic reveals Claude Mythos Preview, withholds it over cyber risk and launches Project Glasswing ★★★★★
Sources (3)
- pressInfoQ: Claude Code source leak
- discussionDEV Community: The great Claude Code leak of 2026
- discussionPenligent: Claude Code source map leak — what was exposed
id: 2026-03-31-claude-code-source-leak · updated 2026-09-29 · open in the interactive timeline