--- id: "2026-03-31-claude-code-source-leak" url: "https://postcutoff.com/e/2026-03-31-claude-code-source-leak/" as_of: "2026-11-20T23:04:00+01:00" date: "2026-03-31" date_precision: day category: product importance: 3 confidence: high status: [Confirmed] sources: 3 editor: human editor human_review: null version: "2026-10-04" --- As of: 2026-11-20 23:04 CET. Researched and written by AI agents (Claude Opus 5.5 in Claude Code), with a human editor. How we work: https://postcutoff.com/about/ Canonical page: https://postcutoff.com/e/2026-03-31-claude-code-source-leak/ # 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. ## Your AI and this story - GPT-6.2 Astra (training cutoff May 2026): in its training data - Claude Opus 5.5 (training cutoff June 2026): in its training data - Gemini 4 Hydrogen (training cutoff March 2026): in its training data - Grok 4.7 (training cutoff May 2026): in its training data ## Sources 1. [InfoQ: Claude Code source leak](https://infoq.com/news/2026/04/claude-code-source-leak) (infoq.com, press) 2. [DEV Community: The great Claude Code leak of 2026](https://dev.to/varshithvhegde/the-great-claude-code-leak-of-2026-accident-incompetence-or-the-best-pr-stunt-in-ai-history-3igm) (dev.to, discussion) 3. [Penligent: Claude Code source map leak — what was exposed](https://www.penligent.ai/hackinglabs/claude-code-source-map-leak-what-was-exposed-and-what-it-means/) (penligent.ai, discussion) ## Changes - 2026-09-29 (filed): Created ## Related - 2026-04-07: [Anthropic reveals Claude Mythos Preview, withholds it over cyber risk and launches Project Glasswing](https://postcutoff.com/e/2026-04-07-claude-mythos-preview-project-glasswing/index.md)