This AI just leaked its own code..

Asmongold TV| 00:11:03|Apr 5, 2026
Chapters7
Describes how Anthropic's Claude Code source leaked online and the immediate disclosure actions taken.

Asmongold TV breaks down the Claude Code leak: how an npm release exposed 500k+ lines of TypeScript, the anti-distillation pills, undercover mode, and what it means for Anthropic and open-source AI tooling.

Summary

Asmongold walks through the surprising chain of events around Anthropic allegedly leaking Claude Code’s source. He notes Anthropic’s grand safety rhetoric and open-source irony as the code surfaced via a mispackaged source map in an npm release for Claude Code, built on Bun.js. The fallout included DMCA takedowns, widespread mirrors, and hype around fan-made projects like Claw Code and Open Quad that repurpose leaked material. He highlights concrete findings in the leak: Claude Code’s 11-step input-to-output flow, hard-coded guard rails, a messy but revealing mix of comments, and a robust bash tool parser. We also get into threats and mitigations, from Axios exposure to potential anti-distillation “poison pills” and the “undercover mode” concept that could make models pretend to be human. The video clarifies what’s actually leaked (a coding tool that interfaces with a model, not the full base model), and speculates on future implications like new feature flags (buddy, Kyus) and a possible IPO risk for Anthropic. Throughout, Asmongold remains skeptical about sci-fi concerns, grounding the discussion in practical takeaways and plausible worst-case scenarios for developers working with AI tooling.

Key Takeaways

  • The Claude Code leak happened because an npm release bundled a 57 MB source map, exposing over 500,000 lines of TypeScript code.
  • Claude Code uses around 11 steps from input to output, far from an all-knowing black box, and includes many hard-coded prompts and guard rails that could be removed if leaked.
  • Anthropic reportedly added anti-distillation pills to misdirect competitors, a tactic that could backfire once the code is public.
  • Undercover mode and dream-like features like Kyus/Chyus hint at ambitious background automation and journal-keeping concepts that may influence future AI tooling.
  • Claw Code and Open Quad emerged as rapid, community-driven responses, transforming leaked code into new repos and cross-model compatibility efforts.
  • The root cause is tied to Bun.js and a source-map production practice; this illustrates how a single packaging mistake can expose critical AI tooling to the internet.
  • target_audience capable of leveraging the information responsibly for developers and AI researchers interested in security, governance, and the practical limits of AI code disclosure.

Who Is This For?

Software developers, AI researchers, and security-minded audiences who want a realistic read on how a source-code leak happens, what it reveals about current AI tooling, and what to monitor to avoid similar mistakes.

Notable Quotes

""Anthropic, a $380 billion startup built on the idea of safety first… accidentally leaked Claude Code's entire source code to the internet at 4 a.m.""
Sets the premise of the leak and irony around safety-focused branding.
""The code was mirrored countless times and cloned by slot tubers like Fire Ship… legally by the way""
Shows the rapid spread and media response to the leak.
""This file contains over a thousand lines of code that helps the large language model reliably parse and execute bash commands""
Highlights a key technical detail that underscores the leak’s practical impact.
""Undercover mode, which is a set of instructions that tell Claude to never mention itself in commit messages or outputs""
Describes a controversial feature that could affect model transparency.
""If you type that at the AI, it's programmed to get upset""
Illustrates the frustration detector concept in the leaked code.

Questions This Video Answers

  • How did Anthropic's Claude Code leak actually happen through npm source maps?
  • What are anti-distillation pills in AI code and why do they matter for competitors?
  • What is undercover mode in Claude Code and what are the governance concerns?
  • Could Bun.js packaging issues cause similar leaks in other AI projects?
  • What should developers learn from the Claude Code leak to secure their own repos?
Asmongold TVClaude CodeAnthropicOpen-source AIBun.jsnpm source mapsAI safetyanti-distillationundercover moderegax frustration detector
Full Transcript
So apparently one AI released the code of another AI. I don't know exactly how something like this happened, but it did. I heard about this yesterday. Look at this. Yesterday, the most ironic thing ever happened. Anthropic, a $380 billion startup built on the idea of safety first that advocates for closed source software for the supposed benefit of humanity. A company Elon calls Missanthropic, whose logo is definitely not a sphincter, whose CEO has been warning us for years that human programmers will be replaced by AI in 6 months. It just accidentally leaked Claude Code's entire source code to the internet at 4 a.m. officially. Oops. Wow. making anthropic more open than open AI. Not intentionally though. In minutes of the leak, Xiaopan Shiao, a security researcher, discovered that version 2.1.88 of the Claude Code MPM package was shipped with a 57 megabyte source map file. You know, that file that's only used in development with the full readable source code of your project. This holy grail of leaks containing over 500,000 lines of TypeScript code that quickly spread across the internet like wildfire. Anthropic's legal team courageously issued DMCA takedowns. Please, bro, don't look at the code. But by the time they woke up in San Francisco, it was already too late. The code was mirrored countless times and cloned by slot tubers like Fire Ship, which the Supreme Court says I can do legally, by the way, as a worldrenowned journalist. I know a lot about the law and various other lawyerings. Um, in today's video, we'll look at all of the incredible discoveries in the code that Anthropic doesn't want you to know about, like its anti-distillation poison pills. its mysterious unreleased features, its undercover mode, its regular expressionbased frustration detector, and many other frustration detector. And it says, look at the look at the ways that are the frustration detector. What the [ __ ] What the hell? For [ __ ] sake. Oh my [ __ ] god. [ __ ] So basically, if you type that at the AI, it's programmed to get upset. Nice. Super secret techniques at the foreskin of AI research. No, this is not an April Fool's Day joke. It is April 1st, 2026, and you're watching the code report. Unfortunately, my lawyer just informed me that showing you Anthropic TypeScript code would be a violation of my parole, and I refuse to go back to jail. But luckily, the open- source community has already created a loophole. Ironically, Claude's most prolific user. He used OpenAI codeex to rewrite Claude Code's TypeScript code to Python code, resulting in a new barely legal project called Claw Code, and it's already become the fastest repo in history to surpass 50,000 GitHub stars. Not only that, but somebody else lop forked the leaked code and made it work with any model that they're calling this new project open quad, and it makes Oh my god. So, they're going to let the AI go free? Holy [ __ ] Projects like Open Code completely obsolete. But maybe now that the code's out in the open, Anthropic will just make it open source. Somebody tried to make a poor quest with the leaked code, but not surprisingly, it looks like Anthropic already deleted it. What a mother effing crazy 24 hours. But how did this code end up leaked in the first place? Well, as I mentioned, the source map was accidentally packaged in an npm release. But that's weird because build tools normally strip out source maps automatically. Well, Claude Code is built on Bun.js, which as you might recall was recently acquired by Anthropic. And it just so happens that about 3 weeks ago, somebody opened up an issue on GitHub about bun.js serving source maps in production. Wouldn't it be Oh, no. So it serves the entire thing of the AI. Oh my god. The f the real World War II will with will be with AI. The more that I see stuff like this, the more that I actually believe something like that could happen. This is if the fastest JavaScript runtime in the world also turned out to be the fastest way to ship your entire codebase to the internet. It's unclear if that was the root cause. And it's also possible that some unfortunate developer did this by accident. Or perhaps some rogue developer did it on purpose. We may never know the truth, but now it's time for the fun part. What did we actually learn from the leak? Well, first we learned that Claude uses Axios. If you subscribe to my channel, then you know that Axios was compromised by North Korean hackers yesterday. The exploit can install uh a remote access Trojan on anyone using this package. And in theory, if that happened on anthropic servers, it could be a massive disaster. But the next thing we learned is that claude code is basically just a dynamic prompt sandwich glued together with TypeScript and not some magical piece of futuristic technology. In a basic AI chatbot, you typically have a hidden system prompt that gets combined with your prompt than the base model uses statistics to regurgitate a bunch of data it stole from the internet. But in Claude Code, things are far more complex with a total of 11 steps from input to output. Somebody already vibe coded a website that breaks down every step. But the most interesting part about this codebase is that it contains tons of hard-coded instructions and guard rails that basically beg Claude to please don't do anything weird. Like like what? Like there's just file after file of these massive hard-coded strings telling Claude to be a good boy. And that's kind of surprising because if this code were ever leaked, it would instantly turn from a black box into a blueprint for Claude's competition. And I Oh, yeah. Exactly. And then also people could just remove that too, right? And then they could just remove all the different limitations that it had. That's exactly what happened. What makes that even more funny though is that Claude was actively trying to stop their competition from copying Claude code by implementing anti-distillation poison pills. It does that by pretending that certain tools exist when in reality they don't exist at all. YOU'RE A BIG FAT FOY. That means if you're some Chinese guy trying to train a new model on Claude's outputs, it's going to talk about tools that don't exist, which will point your model in the wrong direction and just make it suck. In reality, Claude code only uses about 25 different tools or so. And now the Claude distillers know exactly what to look for, and they're likely going to have a field day with the bash tool. This file contains over a thousand lines of code that helps the large language model reliably parse and execute bash commands, which might be the single most important feature in an AI coding assistant. The next thing we need to talk about though is undercover mode, which is a set of instructions that tell Claude to never mention itself in commit messages or outputs where the main what instructions that tell Claude to never mention itself in commit messages or outputs where the main what the [ __ ] idea is to make the outputs look as human as possible. The stated purpose of this feature is to prevent things like model code name leaks, but many have speculated that the true purpose is more deceptive. Like they're trying to covertly use clot in open source project. Yeah. They're trying to use it as like different types of representatives whenever you're doing customer service. So you think you're talking to a human being named Jason, but you're actually talking to the computer. So AI code doesn't get scrutinized when it breaks things catastrophically. A very misanthropic idea indeed. But the irony continues. Another funny thing found in the code is its regax frustration detector. Your state-of-the-art AI model uses simple regular expression matching against your prompt to look for keywords like [ __ ] [ __ ] balls, and so on to determine if you're not having a good experience coding with Claude. It acts nicer to detects a match, it'll simply log an event. The bottom line here is that we're not looking at some sort of alien super intelligence, but rather basic programming concepts that have been around for 50 years combined with a bunch of prompt spaghetti. It's all just an illusion. On top of that, this codebase has a ton of comments. A lot more comments than you would typically find in a human-ritten codebase. And what that tells us is that these comments aren't actually written for humans, but rather for the AI to write its own AI coding tool in an inf. Oh boy. I wonder if this will ever spiral out of control. I do. I wonder when it's going to happen. I mean, cuz I think that we could be a lot closer to it than you would imagine. We could be like, I'm not saying it's going to happen. I don't know. But it's certainly possible. Been in a loop. But perhaps the biggest problem about this leak for Anthropic is not the code itself, but rather the feature names and road map hidden within the code. Like there's a hidden capability under a feature flag called buddy, which appears to be a new Tomagotchi style companion that every developer can customize and raise like a little digital pet. This might Jesus just be anthropic April Fool's Day joke, but there are also references to Opus 4.7 and a new model called Capiara, which might be their new recently teased Mythos model. There's also things like ultra planned, coordinator mode, and demon mode. But oh my god. Oh my god. Uh yeah. Is that right? Holy [ __ ] [ __ ] And uh do you remember a plot of Terminator 3? Specifically, Skynet secretly releases itself as an enemy, creating the need for humans to fully release Skynet, starting the whole war. You know what? I I did actually forget that part. Perhaps the most interesting is Chyus, which is a Greek word for an exact moment in time or God's time. I hate to beat off a dead horse here, but it's a bit ironic that Anthropic didn't get to reveal Kyus at the exact time it wanted to, and instead God chose the right time. The feature itself seems to be some kind of background agent that keeps a daily journal. He uses dream mode to consolidate memories and does work for you in the background. Dream mode to Oh my on a specific schedule. be pretty cool, but at the end of the day, this leak is a pretty huge setback for Anthropic, which hopes to IPO later this year and offload their bags to the retail public. And it's yet another reminder that your top secret application is just one npm publish away from becoming open source, whether you like it or not. Oh my god. I I I didn't even know this happened really. I mean, like, so it's always working. Yeah. What about woke mode? Well, that's Gemini. I'll link you guys the video. I mean, this is a it's a short video. It really went through this deliberately done against revenge because Anthropic did not cooperate with the government. Uh maybe I mean maybe that's why. I don't know. I mean it it's just Anthropic is gone. I don't think they're gone but like they are uh you know like I guess they're they're in a situation that's a little dangerous for them. I'd say so. I think you misunderstood what leaked. It's not the AI model. It's just a tool used for coding. It's just an app that communicates with the model from their server. It gives you a good dev experience. Okay. But then they're using that in order to like reference things that are probably in the base model. Okay. I I didn't I actually I didn't understand that. So that's good to know.

Get daily recaps from
Asmongold TV

AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.