BREAKING: Claude Code source leaked
In what may be the most significant leak in AI history, Anthropic accidentally published the full source code for Claude Code—their closely guarded «secret sauce»—through source maps in an npm package. The company has historically refused to open-source Claude Code and sent hundreds of DMCA takedown notices when earlier leaks occurred, yet now the entire 390,000-line codebase is circulating freely. The leak exposes unreleased features, reveals that Claude Code lags behind open-source alternatives in benchmarks, and shows evidence that Anthropic engineers have been copying from open-source projects like Open Code. Can Anthropic suppress what's already everywhere, or will they finally embrace the open-source approach the community has been demanding?
Key Takeaways
The leak occurred because Anthropic accidentally included source maps in their npm package, likely while trying to improve error logging to diagnose rate-limit issues—source maps exist to link minified production code back to readable source for debugging.
Claude Code ranks 39th out of 39 harnesses on TerminalBench for Opus, trailing far behind open-source alternatives; the leaked code even shows Anthropic copying behaviors from Open Code rather than the reverse.
The source reveals multiple unreleased features including Buddy (a companion pet), Dream Mode (automatic memory consolidation), Coordinator Mode (parallel worker agents), and Chyros (always-on proactive agent), plus anti-distillation defenses and an «undercover» flag for employees contributing to external projects.
Anthropic is speedrunning a world record for erroneous DMCA takedowns, going after people who merely forked the public Claude Code GitHub repo (which doesn't even contain the leaked source), a strategy that will only damage their reputation further.
The leaked codebase scores 7/10 for code quality with strong type safety (only 38 «any» uses across 500+ files) but suffers from over 1,000 scattered feature flags, massive «god files» exceeding 5,000 lines, and dangerous environment variable sprawl with no centralized secret sanitization.
In a Nutshell
Anthropic's attempt to keep Claude Code proprietary has spectacularly backfired with a full source leak, revealing not only that their harness underperforms open-source alternatives but also that they've been borrowing from those same projects—the company's only viable path forward is to abandon suppression, open-source Claude Code officially, and let their engineers turn a PR disaster into community engagement.
How Source Maps Exposed the Code
Anthropic accidentally shipped debug files that map compiled code back to readable source.
Build step transforms code Browsers can't run TypeScript, so JavaScript projects compile/minify/obfuscate source into production bundles. Claude Code ships as one 13MB minified JavaScript file that's essentially unreadable.
Source maps enable debugging To debug minified code, developers create source maps that link each production character back to original source. These maps effectively contain the full original codebase.
Maps shipped with package Anthropic included a source map folder in their npm package, likely while trying to get better error logs to diagnose rate-limit issues users were experiencing.
Leak went viral instantly Users downloaded the npm package, extracted the source from the maps, and within hours the code was mirrored across thousands of GitHub repos and R2 buckets despite Anthropic's takedown attempts.
Claude Code Lags Behind Open Source
Benchmarks show Claude Code is the worst harness for Opus models.
Claude Code Lags Behind Open Source
On TerminalBench, Claude Code ranks dead last—39th out of 39 harness-model pairs. When Cursor's harness runs Opus, it scores 93%; Claude Code with the same model scores only 77%. Even more embarrassingly, the leaked source contains multiple references to Open Code, showing Anthropic engineers copied behaviors like scrolling from open-source projects they were supposedly competing against. The «secret sauce» turns out to be ketchup packets stolen from the open-source cafeteria.
Hidden Features Revealed in the Leak
The DMCA Speedrun Nobody Asked For
Anthropic is issuing hundreds of takedowns for a leak they can't suppress.
Within hours of the leak, Anthropic began sending DMCA takedown requests to GitHub at a pace that may set a record for any company in history. They're not just targeting repos with the leaked source—they're going after people who simply forked the official Claude Code repository, which doesn't even contain the source code, only plugins and documentation. The company has previous form here: when source maps leaked in an earlier release, they sent hundreds of DMCAs trying to scrub the internet of their own mistake.
The situation has escalated to absurdity. Someone noticed that several internal Anthropic packages (referenced in the leaked package.json with workspace:* syntax) didn't exist on npm, so they registered those package names with a disposable email for obvious malicious purposes. Anyone trying to build the leaked source without proper protections could install these poisoned packages. Meanwhile, projects are already appearing that rewrite the leaked TypeScript in other languages—derivative works that may fall outside copyright protection, though that's untested legal territory.
The company's official statement emphasizes «human error, not a security breach» and confirms no customer data was exposed. But the framing as human error is telling, especially given that Claude Code builds itself with Claude Code—making it entirely possible an AI agent, not a human, made the packaging mistake that led to this historic leak.
Code Quality: Pretty Good, Actually
Seven out of ten with strong typing but scattered flags and god files.
What Anthropic Must Do Now
Suppression has failed; open-source is the only credible path forward.
Be Humans, Not Corpo Robots
Authenticity beats hype; let engineers engage instead of hiding behind lawyers.
“Every engineer working on Claude Code has something cool they built that they want to talk about that they haven't talked about because they can't. This is closed fucking source. It's not closed source anymore. It's source available with a bunch of asterisks. Fix that by making it open source. And instead of trying to press release this shit, instead of trying to suppress it with lawyers, just lean into it. Let your engineers be excited because excitement will always, always, always, always beat hype.”
People
Glossary
Disclaimer: This is an AI-generated summary of a YouTube video for educational and reference purposes. It does not constitute investment, financial, or legal advice. Always verify information with original sources before making any decisions. TubeReads is not affiliated with the content creator.