Technology

Anthropic publishes Claude Code source by mistake

More than 500000 lines appear on npm, safety branding meets basic release-control failure

Images

Anthropic accidentally publishes Claude Code source code for anyone to find Anthropic accidentally publishes Claude Code source code for anyone to find the-decoder.com

Anthropic has accidentally published large parts of the source code for Claude Code, its AI coding tool, after packaging the software for distribution on npm, a public JavaScript repository. According to The Decoder, developers found more than 500,000 lines of code and over 1,000 files that were not meant to ship, including implementation details and references to unreleased models and features. Anthropic said the exposure was caused by “human error” rather than a security vulnerability, and that no customer data was affected.

A source-code spill is not just an embarrassment; it is a transfer of leverage. Claude Code is part of the fast-growing category of “agentic” developer tools that run commands, call APIs, and plug into build systems—often with the same permissions as the engineer using them. When the internal mechanics of such a tool become public, competitors learn what to copy, attackers learn what to probe, and customers learn what assumptions the tool makes about its environment. Even if no credentials were leaked, the code itself can reveal how prompts are structured, how tools are invoked, how guardrails are enforced, and where the product trusts inputs it does not fully control.

The business impact is equally direct. AI coding assistants are sold as workflow glue: the value is not only model quality but the surrounding orchestration—how the tool routes tasks, manages context, and integrates with repositories and CI pipelines. Leaking that layer lowers the cost of cloning a similar product, which pushes differentiation away from software and toward contracts, licensing restrictions, and distribution control. That tends to harden product strategy: more closed components, stricter terms, and tighter coupling to proprietary backends. In practice, the more a company talks about becoming a “standard,” the more it must defend its moat through process discipline rather than rhetoric.

The incident also highlights a recurring weakness in modern software supply chains. npm and similar registries make it easy to ship updates quickly, but they also make it easy to ship the wrong thing to everyone at once. In a world where developer tools are increasingly autonomous—running tests, editing files, and executing commands—basic release hygiene becomes part of the security model. A single packaging mistake can turn internal design into public documentation.

The Decoder notes this was Anthropic’s second leak in just days, after internal blog posts about an unreleased “Mythos” model reportedly appeared prematurely. This time, the leak was measured in hundreds of thousands of lines of code, uploaded to a repository designed for frictionless reuse.