Tragic mistake... Anthropic leaks Claude’s source code
Anthropic, het bedrijf dat zichzelf positioneert als de veilige AI-keuze, lekte zijn volledige Claude Code broncode via een vergeten regel in een npm-config. 512.000 regels code, verborgen features en een hoop lessen over hoe fragiel onze AI-infrastructuur eigenlijk is.

Why the Anthropic leak says more about AI safety than you think
Sometimes you come across something you just have to share. Not a client case, not my own project, just a story I saw go by that I was still thinking about days later. At the end of March, Anthropic accidentally leaked the full source code of Claude Code, their own flagship. Fireship made a lovely video about it, but the deeper you dive into the details, the more this story says about the AI tools we are all building on more and more.
A 380 billion dollar mistake
Anthropic positions itself as the safe AI choice. The company is heading toward an IPO at a valuation of around 380 billion dollars, and Claude Code is the crown jewel in that. That exact product leaked its complete source code on 31 March, not through a hack, but through a forgotten line of configuration.
What happened: the npm release of Claude Code accidentally contained a source map of 59.8 megabytes. For non-developers: that is like putting the house key in your parcel instead of just the gift. A source map is the translation table that turns unreadable, minified code back into the original source.
Security researcher Chaofan Shou found the file and posted the link on X. Millions of views later, the complete codebase was on GitHub, neatly readable. Anthropic called it, to the press, "a packaging error through human mistake, not a security breach". That is technically correct. But there is a pattern in it.
Two leaks in one week
Because this was not the first time. A similar leak happened before, over a year ago. And five days before this leak, a CMS error had already put around three thousand internal documents on the street, including plans for unannounced models.
Two leaks in one week, at the company that has safety as a brand promise. Not because the people there are bad, the leaked code actually shows how seriously it is engineered. But because even a world-class AI lab trips over the most banal part of software: the release checklist.
What was actually in that code
This is where it gets interesting for me. The code shows what an AI tool with billions in revenue really is: not magic, but an enormous collection of rules, checks and guardrails. Four findings stood out.
Undercover mode. A hidden setting that switches on when Anthropic employees use Claude Code on open source projects. The tool then wiped every trace of itself from commits and pull requests. AI-written code ends up in open source projects this way without anyone knowing an AI wrote it. Varonis broke down this finding in detail.
Anti-distillation "poison pills". Fake tools that can be injected into answers to mislead competitors who try to copy Claude's behaviour. Clever. Only: now that the trick is public, it works a lot less well.
KAIROS. A fully built but never announced background agent. It keeps running when your laptop is closed, decides for itself when it springs into action, and keeps a log it cannot wipe itself. The direction is clear: AI that runs along permanently, instead of a chat window you open and close.
And the human side. One function of over three thousand lines. An old-fashioned regex system that scans your messages for frustration. And 187 different verbs for the loading spinner, someone checked whether the famous "reticulating" from SimCity was in there. It was.
The context behind the mistake
The contrast is the story: deeply engineered AI guardrails on the inside, a forgotten line of .npmignore on the outside.
What this means for e-commerce automation
Why am I sharing this on a blog that is mostly about marketplaces? Because the leak exposes something about all AI systems we build operations on.
Claude Code turns out to be a deeply engineered system of guardrails: dozens of checks on every command, five strategies to compress context, tens of thousands of lines just to make tools work reliably. That is reassuring and sobering at the same time. Serious thought went into it, but so does an enormous amount of manual steering to keep an AI predictable.
For marketplace automation this means: stop treating AI tools as black boxes. The listing generator or repricer you use is built the same way, with the same kind of hardcoded assumptions, hidden feature flags and silent behaviour rules. You want to know which ones.
In my Claude guide I already wrote why you get more out of AI when you record your own process instead of leaning on the magic of the tool, this leak is the proof of that, from the inside.
And then the fragility: this leak arose from one missing line in a configuration file. That same mistake can happen tomorrow at the vendor of your inventory management, your PIM or your pricing tool. The question is not whether your vendors make mistakes. The question is what leaks along when it happens.
Transparency versus safety
The biggest irony: Anthropic deliberately protects its code through closed source, and made itself "more open" in one night than OpenAI has ever been. It then sent DMCA takedowns to GitHub mirrors. Of code it had published itself.
And the undercover mode was, of all things, built to prevent internal secrets from leaking through code. Then the complete source code leaked through a file they forgot to exclude. You cannot make it up.
There is also an honest counter-reading. No customer data and no credentials leaked, and the architecture turned out to be impressively solid. Some security researchers even called the leak useful: now it is verifiable how the tool handles commands and permissions. Transparency by accident, but transparency nonetheless.
The lesson for e-commerce: push harder for openness with your AI vendors. If a listing generator secretly favours certain phrasings, you want to know. If a pricing algorithm has hardcoded assumptions, you want control over that. How you design that relationship between AI and your customer I described earlier in Designing with LLMs.
The new reality of AI dependence
This leak marks a turning point: AI companies can no longer protect their secret sauce through obscurity. Within two hours a rebuilt version was on GitHub that reportedly reached 75,000 stars, possibly the fastest growing repository ever. Mirrors appeared with the note "will never be taken down". The code is out of the bottle and is not going back in.
From forgotten line to copied worldwide
Two hours after the leak a copy already had 75,000 stars. Takedowns were structurally too late, removing things from the internet is no longer a strategy.
The question is not whether more leaks will come, but when. My conclusion is the same as with every vendor discussion in e-commerce: build so you can switch. Keep your prompts, data and workflows under your own control, do not depend on one AI vendor, and demand control over the systems that run your business.
The tools will change anyway. Your process is the only thing that stays yours.
Sources and further reading
- Video: Tragic mistake... Anthropic leaks Claude's source code, Fireship
- Claude Code Source Leaked via npm Packaging Error, The Hacker News
- Anthropic Accidentally Exposes Claude Code Source via npm Source Map, InfoQ
- A Look Inside Claude's Leaked AI Coding Agent, Varonis
- Full source code for Anthropic's Claude Code leaks, Cybernews
- Claude Code Source Leak: Everything Found, Claude Fast
Want to spar about your marketplace strategy?
No hype. A sober look at where your growth is and where margin leaks away.
Get in touch