Skip to content
    e-commerce-strategy EN

    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.

    Tragic mistake... Anthropic leaks Claude’s source code
    IN SHORT
    1.On 31 March a 59.8 MB source map in the npm release exposed Claude Code's full source code - a forgotten configuration line, not a hack, at a company heading for a 380 billion dollar IPO.
    2.The leaked code revealed an undercover mode that wipes AI traces from open source commits, anti-distillation "poison pills" and KAIROS, a never-announced always-on background agent.
    3.Within two hours a rebuilt copy reportedly hit 75,000 GitHub stars - takedowns are structurally too late, so keep your prompts, data and workflows under your own control and build so you can switch vendors.

    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.

    How a source map exposes your whole codebase
    How a source map exposes your whole codebase

    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.

    Timeline of the leaks at Anthropic, March-April 2026
    Timeline of the leaks at Anthropic, March-April 2026

    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.

    Four striking findings in the leaked code: undercover mode, poison pills, KAIROS and the human details
    Four striking findings in the leaked code: undercover mode, poison pills, KAIROS and the human details

    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.

    $2.5 bln
    Annual revenue of Claude Code alone
    $380 bln
    Valuation Anthropic is steering toward for its IPO
    23
    Security checks on every shell command, the code really is solid
    FIGUUR 01 Why this packaging error hurts so much.

    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.

    Your e-commerce stack leans on the same black box: from your operation through AI tools to the AI vendor
    Your e-commerce stack leans on the same black box: from your operation through AI tools to the AI vendor

    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.

    The transparency paradox: what Anthropic wanted to protect versus what actually happened
    The transparency paradox: what Anthropic wanted to protect versus what actually happened

    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.

    GitHub stars (x1,000)Rebuilt versionForks of mirrorsHour 0Hour 24
    FIGUUR 02 Spread in the first 24 hours after discovery (reported milestones, trajectory indicative).

    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.

    Build so you can switch: what you keep under your own control versus what you rent
    Build so you can switch: what you keep under your own control versus what you rent

    The tools will change anyway. Your process is the only thing that stays yours.

    Sources and further reading

    Let's talk

    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