Anthropic Accidentally Published Claude Code's Full Source to npm — and the Internet Forked It Immediately
Anthropic published 512,000 lines of Claude Code's TypeScript source to the public npm registry on March 31, sparking a wave of community forks that became some of the fastest-growing GitHub repositories in history.
Original sourceOn March 31, 2026, Anthropic accidentally uploaded the complete source code of Claude Code — 512,000 lines across 1,906 TypeScript files — to the public npm registry. The package was live for several hours before being taken down. By then, dozens of copies had been archived and the community had already started building.
Within 24 hours, forks and reimplementations became some of the fastest-growing GitHub repositories ever recorded. The leaked code revealed Claude Code's architecture, tool implementations, context management strategies, and internal prompt structures — details that had been closely guarded since the product's launch.
This was the second major Anthropic leak within days. Earlier that week, a separate incident exposed references to an unannounced model codenamed "Mythos" in marketing materials, suggesting a pattern of pre-release information control failures as the company scales rapidly.
The leak has had immediate product consequences. Several independent developers have already shipped reimplementations — including Kin-Code, a Go-based binary that replicates core Claude Code functionality with multi-provider support and zero runtime dependencies. The Claude Code architecture is now effectively public knowledge, and the community is iterating on it faster than any internal team could.
For Anthropic, the damage is partly reputational (two leaks in a week suggests internal process gaps) and partly competitive (rivals can now study the exact implementation choices that make Claude Code effective). The DMCA takedowns Anthropic filed after the incident — reportedly hitting thousands of GitHub repositories — generated significant backlash from open-source communities who viewed the forks as legitimate fair use of accidentally published code.
Panel Takes
The Builder
Developer Perspective
“The architecture choices in the leaked code have been eye-opening — particularly the context management and tool call routing. Even if you're not building a Claude Code competitor, studying how Anthropic structures agentic workflows is genuinely educational. The DMCA overreach is the frustrating part.”
The Skeptic
Reality Check
“Two major leaks in one week isn't bad luck — it's a process problem. Anthropic is scaling faster than its internal controls can keep up with, which is concerning for a lab whose safety credibility depends on demonstrating disciplined information management. These patterns tend to worsen before they improve.”
The Futurist
Big Picture
“Accidents like this are accelerating open-source AI development in unexpected ways. The forks emerging from this leak will push Anthropic to compete on model quality rather than tooling moats — which is ultimately healthier for the ecosystem. The real Claude Code advantage was always the model, not the TypeScript.”