Anthropic Accidentally Leaked 512,000 Lines of Claude Code Source via npm — Then Scrambled to DMCA It Away
A packaging error exposed the full internal architecture of Claude Code, Anthropic's flagship coding agent, revealing guardrails, agent workflows, and proprietary orchestration logic before GitHub pulled the repos under DMCA threat.
Anthropic's Claude Code — the agentic coding tool that has become one of the most widely adopted AI developer products of the past year — had its complete source code exposed to the public through what appears to be a misconfigured npm publish, according to a report from @TheHackersNews. The leak comprised roughly 512,000 lines of code, offering an unprecedented look inside the internal workings of a frontier AI agent system.
The exposed files reportedly included the full agent orchestration pipeline, internal guardrail configurations, prompt templates, and the feedback loops Claude Code uses to plan, execute, and self-correct during multi-step coding tasks. As @MatthewBerman detailed in a widely shared breakdown, the leak essentially gave the open-source community — and Anthropic's competitors — a complete blueprint for how one of the most capable commercial coding agents is actually built under the hood.
Get our free daily newsletter
Get this article free — plus the lead story every day — delivered to your inbox.
Want every article and the full archive? Upgrade anytime.
No spam. Unsubscribe anytime.