Subscribe
AI

What Anthropic's Second Source Code Leak Reveals

Anthropic accidentally published a 59.8MB source map file. The contents reveal an ambitious product roadmap and a persistent supply chain vulnerability.

3 min read
Code editor screen showing lines of source code with syntax highlighting
Anthropic accidentally published 500,000 lines of Claude Code source in an npm package update.

Anthropic has a supply chain problem. The leak occurred on March 31, when the company accidentally published the entire source code for its Claude Code assistant—a massive 59.8MB source map file bundled inside an otherwise routine npm package update that suddenly exposed 2,000 TypeScript files and over 512,000 lines of proprietary code to the public.

Security researcher Chaofan Shou discovered the exposed file. Anthropic hastily removed the package within seven hours, but the code was already mirrored across numerous GitHub repositories by opportunistic developers. Competitors can see exactly how the new Claude Code engine operates under the hood.

CS
Chaofan Shou
@fried_rice
𝕏
Anthropic just leaked the entire source code for Claude Code via a source map in their latest npm package. 59.8MB of pure TypeScript.
Mar 31, 2026

What the code reveals

The source map contained 44 feature flags for unshipped tools, providing a crystal-clear view of their closely guarded product roadmap.

Developers who examined the leaked files reported 44 unreleased feature flags, covering autonomous background agents (internally called KAIROS), multi-agent orchestration, voice commands and browser control.

The mechanics of the error

Source maps exist to reverse minification, allowing developers to debug production code by mapping it back to the original source. Standard practice strictly dictates excluding these sensitive diagnostic files from public npm registries via a simple .npmignore configuration. Anthropic engineers completely failed to implement this basic exclusion for version 2.1.88.

The failure is shockingly basic. A simple automated check in the continuous integration pipeline would easily catch a 59.8MB map file before deployment. The fact that the file reached production clearly indicates a severe lack of internal safeguards.

A pattern of exposure

AI companies operate at a blistering speed that routinely breaks standard security practices. The Claude Code leak came days after a separate content management misconfiguration exposed draft material about an unreleased Anthropic model called Mythos.

Customer risk remains remarkably low for now. The leak did not expose any live API keys or active customer databases.

The long-term risk to Anthropic is major. The company markets itself heavily on safety, rigorous testing, and enterprise-grade security. Failing to secure its own flagship source code actively undermines that lucrative enterprise positioning, and well-funded competitors now possess a detailed blueprint of their entire technical architecture.

TLDR

Anthropic leaked the source code for its Claude Code tool in a 59.8MB npm package file. Developers who examined it reported 44 unreleased feature flags, including autonomous background agents, multi-agent orchestration, voice commands and browser control.

KEY TAKEAWAYS

01Anthropic exposed 512,000 lines of Claude Code source via an npm source map error.
0202Security researcher Chaofan Shou discovered the exposed source map.
0303Reported feature flags cover autonomous background agents, multi-agent orchestration, voice commands and browser control.
04

FREQUENTLY ASKED QUESTIONS

Did the Claude Code leak expose customer data?
No. The leak contained source code and feature flags, but no customer credentials or API keys were exposed.
How did the code leak happen?
Anthropic published a 59.8MB source map file in an npm package update, failing to exclude it from the public release.
What new features were revealed in the leak?
The code contained 44 feature flags, including tools for AI-powered test generation, security scanning, and automated debugging.
What's your reaction?

Make us a preferred source on Google

Tap once and our reporting shows at the top of your Google search results and AI answers. You can change this at any time.

Add as a preferred source on Google
Subscribe — it's free