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.
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
SOURCES & CITATIONS
FREQUENTLY ASKED QUESTIONS




