March 31, 2026
Leaked code, louder comments
The Claude Code Source Leak: fake tools, frustration regexes, undercover mode
Fans split: clever defense or shady tricks? 'Undercover mode' and fake tools send comments wild
TLDR: Anthropic’s Claude Code source spilled via a packaging mistake, exposing tricks like fake tools and an “undercover” mode that helps the AI appear human. Commenters are split between “smart defense” and “shady deception,” with extra heat over unlabeled AI commits, conspiracy whispers about intentional leaks, and memes about regex detecting emotions.
Anthropic accidentally exposed the full Claude Code internals, and the code leak lit up Hacker News faster than a Friday deploy. Sure, there’s nerdy treasure—fake “anti‑distillation” tools to poison copycats, a stealthy “undercover mode” that helps the AI sound human, even a “frustration detector” using pattern rules—but the real show is the comments. The crowd is deeply divided. One camp calls the fake tools a clever booby trap for model cloners; the other calls it anti‑competitive and sneaky.
The biggest panic: undercover mode. Readers worried this means AI-written code and pull requests could look human with no labels. Some were confused—“does this just mean you can use Claude without credit?”—while others called it straight-up deception in open source. Conspiracy theorists chimed in too: it’s Anthropic’s second leak in a week, so a few swear it’s intentional chaos marketing. Meanwhile, jokesters dunked on the “frustration via regex” bit, reviving the classic meme: “now you have two problems.”
Side-eye also hit the Axios dependency (“timely, given… other news”), the claim of 250,000 wasted API calls a day (CFO memes ensued), and a teased autonomous agent mode called KAIROS (“hello, office Skynet”). Bonus drama: one commenter said the write‑up itself reads AI‑generated. Peak 2026 energy
Key Points
- •Anthropic accidentally shipped a source map in a Claude Code npm package, exposing the tool’s readable source code.
- •The package was pulled, but the exposed source was mirrored on GitHub and discussed on Hacker News.
- •Source code revealed an anti‑distillation feature that injects fake tool definitions via a GrowthBook‑gated flag for first‑party CLI sessions.
- •A second anti‑distillation mechanism summarizes assistant text server‑side and returns a cryptographically signed summary, limiting captured reasoning in API logs.
- •The leak followed recent Anthropic legal actions against OpenCode over use of Claude Code internal APIs to access the Opus model at subscription pricing.