Claude Code source code accidentally leaked via npm package
Security researcher Chaofan Shou disclosed the exposure on X; mirrors reached tens of thousands of GitHub stars within hours, revealing unreleased features codenamed KAIROS and Mythos.
- Security & misuse
- Open weights & ecosystem
- Minor
A release of the @anthropic-ai/claude-code npm package, version 2.1.88, shipped without excluding a source-map file — a debugging artefact, roughly 60MB in size, that maps minified production code back to its original form — leaving around 512,000 lines of unobfuscated TypeScript across some 1,900 files publicly retrievable. Security researcher Chaofan Shou disclosed the exposure on X, and the code was quickly downloaded from Anthropic’s own storage and mirrored to GitHub, where copies accumulated tens of thousands of stars and forks within hours.
Anthropic said the leak was “a release packaging issue caused by human error, not a security breach,” and that no customer data or credentials were exposed. The exposed source nonetheless revealed internal architecture and a number of unreleased features and codenames, including an autonomous background-agent mode referred to as KAIROS, an unreleased model or project called Mythos, and details of Claude Code’s multi-agent orchestration and memory systems. Separately, some researchers flagged that an unrelated supply-chain compromise of the axios npm package overlapped with the same release window, though Anthropic’s own packaging error and that compromise were reported as distinct issues.
Anthropic pulled the affected package version after the leak was reported. The incident became a case study in how a routine build-tooling default — automatic source-map generation — can undo the protection closed-weight labs otherwise rely on to keep implementation details private.