Anthropic Accidentally Leaked Claude Code
By Beau Johnson Β· Β· 15 min Β· 3.9K views
Chapters
About this video
Transcript
Read the full transcript
0:00Just a few hours ago, Anthropic leaked their entire source code for Claude Code. And I'm going to tell you what this means for us builders, exactly. Their own flagship AI coding tool, all the source code leaked. And when I say entire source code, I mean 19,000 files, 512,000 lines of TypeScript, every tool, every system prompt, every internal feature. This is insane. All of it just sitting there on an NPM for anyone to find. And the way it happened is kind of hilarious. So, I'm going to tell you what went down and this just broke a few hours ago. A security researcher named Shalfin Shal discovered that when Anthropic published their Claude Code package to the NPM registry, they
0:45accidentally included something called a source map file. Now, if you're not a developer, let me explain what this means in simple terms. When you build software, you write the code in a clean, readable format before you ship it to users. You usually bundle it, minify it. So, this means you compress everything down into one big file that's really hard for humans to read. It's like taking a book and removing all the spaces and punctuation and chapter breaks. The computer can still read the file, but a person looking at it would have no clue what's going on. So, basically a source map is a decoder ring. It maps out the compressed mess back to the original readable code. Developers use source maps for debugging. So, when something crashes, they can see exactly which line the
1:30original code caused the problem. Here's the thing. The source map file literally contains the entire original source code embedded inside as strings. Every file, every comment, every internal constant, everything. So, Anthropic shipped their source map file inside an NPM package and the NPM is a public registry. So, anyone can download it. Anyone can look inside. A security researcher did and now the entire internet is going insane. So, basically Claude Code is now open source. Claude Code's proprietary source code, everyone on the internet now has access to it. So, the irony here is incredible because inside the leaked code, there's literally an entire system
2:15called undercover mode specifically designed to prevent Anthropic's internal information from leaking. How does this happen? They built a whole subsystem to stop their AI from accidentally revealing internal code names in Git commits. And then they shipped the actual source code in a map file that was probably generated by Claude itself. Real quick, before we keep going, if you're watching this and you want to actually build with some of these tools, not just watch videos about them, then you're going to want to check out our community down below, Shipping School. We have a full Claude Code course, a full Open Claude course, and four live bootcamps every single week where we actually help you get set up from scratch. Like actually set this thing
3:00up, not just watch a tutorial and figure it out by yourself. And we also provide one-on-one coaching, so you can book a call with me, we can share screens, and I can help you get Claude Code or Open Claude running on your machine. That's it, no fluff. I built this community because watching YouTube's only gets you so far. We launched it just 3 days ago and we have over 55 members. You need people around you who are actually building, people who hold you accountable, and coaches who can help you when you get stuck. I'll put the link in the description down below. Get in now before the price goes up. So, you can't make this up. This literally just happened hours ago and everyone's going insane. But I'm going to talk about what's actually inside and what this means for us. Does it affect us at all? Here's my two cents. Because, you know, the interesting part is, you know, I
3:47want to be clear and, you know, I'm not endorsing people to go through like proprietary code, but the cat's out of the bag. This has happened. It can't You can't go back. You know, it's already on GitHub with over 1,100 stars and 1,900 forks. Multiple news outlets are covering it. So, I'm going to break down what the developer community has found because some of it is pretty fascinating. The first thing is is the scale. You know, Claude Code is not a toy project. The main entry file alone is nearly a megabyte. So, that's one file. The entire code base has 40 built-in tools, 50 {slash} commands, a custom React-based terminal renderer using a library called Ink, and it all runs on Bun, not Node. Bun is a faster
4:32JavaScript runtime, so they're not using a standard tools for most that most developers use, basically. You know, they built this thing for speed from the ground up. The second thing is the tooling system. Claude Code uses what they call a plugin architecture where every capability is a discrete, permission-gated tool. So, file rating is a tool. Bash execution is another tool. Web fetching, a tool. LSP integration, another tool. Each one has its own permission system that controls what it can and cannot do. The base tool definition alone is 29,000 lines of code. And there about 40 of these tools. So, you can start to see why this 512,000
5:17lines total is insane. The third thing is, this is the big one out of all of it, is the query engine. This is the brain of Claude Code. It handles all the AI model calls, the streaming, the caching, the orchestration. It's 400 It's 46,000 lines of TypeScript by itself. That's bigger than most entire applications. This is where all the real intelligence coordination happens. The fourth thing is the multi-agent orchestration. Claude Code can spawn what they call sub-agents or swarms to handle complex tasks in parallel. Each agent runs its own context with a specific tool permission. Does this sound familiar? So, that's basically what Open Claude does with sub-agents and cron jobs, but Claude Code has it built in directly into the core. The
6:02fifth thing is there's an IDE bridge system. You know, it's a bidirectional communication layer that connects VS Code and JetBrains extensions to the CLI using JWT-authenticated channels. This is how Claude and your editor experience works. It's not a simple plugin, it's a full two-way communication bridge. Here's where it gets more interesting. The leaked code revealed some features that Anthropic hasn't announced yet and those are the ones that have the developer community going crazy. There's a full virtual pet system called Buddy. I didn't know how to process this, but I'm not making it up. Claude Code has a Tamagotchi-style companion pet built into it. It uses a
6:47deterministic random number generator seeded from your user ID. So, every person gets a unique pet, okay? There are six rarity tiers from common all the way to legendary. Species names like Pebble Crab and Cloud Ferret and Crystal Drake and Cosmo. Each pet gets a procedurally generated stats including categories like debugging, patience, chaos, wisdom, and snark. Interesting. There's even 1% shiny chance completely independent of rarity. So, a shiny legendary Nibblux has a 0.01% chance of being rolled. The pets is next year import prompt as a ASCII
7:33art with idle animations and reaction animations. This is interesting. And it has its own personality generated by Claude when you hatch it. The Claude references April 1st through the 7th as a teaser window with a full launch plan for May 2026. This is generally one of the most creative things I've seen as a developer tool being put out by a huge major company. It's like they put an Easter egg inside a professional coding tool and I actually love it. But the bigger reveal here is something called Kairos. This is the persistent, always-running assistant mode where Claude doesn't wait for you to type. It watches what you're doing. It logs the observations, decisions, and actions
8:19throughout the day on regular intervals. And then it receives tick prompts that let it decide whether to act proactively or stay quiet. There's a 15-second blocking budget, so it never interrupts you for more than 15 seconds at a time. And when it is active, it uses a special brief output mode designed for a persistent assistant that shouldn't flood your terminal. If that sounds familiar to you, that's because it's basically what Open Claude already does with heartbeats and cron jobs. I literally run this pattern every single day. My agent checks in on a schedule, decides if there's anything worth bringing to my attention, and either helps or stays quiet. Anthropic built the same thing into Claude Code, which tells me we're on the right track with
9:06how we think about AI agents. Now, I'm going to give you my honest take on what this actually means for us because it is important. I mean, neat news that breaks like this. How does it affect us actually, right? First, the leak itself. This is an embarrassing mistake for Anthropic. Whether they intended to do this or not, I don't know. But a build configuration oversight, someone forgot to add a {dot} map to their NPM ignore file, or they didn't configure Bun's bundler to skip source map generation for production builds. I don't know, but Bun generates source maps by default unless you explicitly turn them off. That's it. That's the whole vulnerability. And the NDTV is reporting this actually the second time this has happened in the year. So, there's a
9:52pattern going on. What I think is more important than this embarrassment is what the leak reveals about the state of AI coding tools is generally impressive. Anthropic has poured serious engineering into Claude Code. This is not a wrapper around an API. This is a full production grade development environment with multi-agent orchestration, persistent memory, proactive assistance, IDE integration, and apparently a virtual pet system. I think that's cool. The bar for AI coding tools is really high, right? For those of us in the Open Claude world system, I actually see this as validation more than anything. The pattern we use every day with Open Claude, like the memory systems, the multi-agent setups, the heartbeat monitoring, the skill injection, Claude
10:38Code is building toward the same architecture. They just do it with a closed proprietary way. We do it with an open customizable way. Which would rather you Which would you rather choose? So, that is a fundamental difference of the two, right? And with Open Claude, you control everything. You know, you pick your model. You pick your memory system. You configure your agents however you want with your own data. Nothing leaves your machine unless you want it to. If you're struggling to keep up with content, what I'm about to save you about 40 days worth of work. [music] I built something called Content Machine. It's 10 AI agents that run on the Open Claude orchestration, and they handle everything. Scripts, [music] thumbnails, X posts, blogs, outreach, clips, newsletters, all of it. So, I went from 1,000 subscribers to 4,000
11:24subscribers on YouTube in 7 days using this exact system. Every single morning, I wake up, [music] and the content's already done. I spend maybe 15, 20 minutes reviewing and approving them, and I move on with my day. It works for any niche, fitness, finance, real estate, marketing, whatever you're building, and it is 100% completely customizable to your use case. So, you get the mission control dashboard, all of the cron jobs, everything I've built over the last 40 days [music] helping me gain more and more people to subscribe and join the community. So, you plug in your own thing, and it molds it to you. It learns how you talk, and it writes so it doesn't sound like AI slop. $97 one time. It's not a subscription. I'll put the link down
12:09below, and you'll thank me later. Claude Code is powerful, but it's literally a black box that just had its own lid blown off because of a build mistake. And that tells you something about the tradeoffs of using closed tools versus open ones. The other thing I want to point out is the security angle. Anthropic built an entire undercover mode to prevent their AI from leaking internal information, and then they leaked their own source code through a basic DevOps oversight. This is a reminder for every single one of us that security is not just about fancy stuff. It's about the basics. Check your build pipeline. Check what files you're actually publishing. Check your NPM ignore. Check your Git ignore. The simplest mistakes cause the biggest problems. I run my own security checks
12:56on my Open Claude setup. Weekly audits. I've talked about this before, and it's not because I'm paranoid. It's because I've seen what happens when you don't run these audits. So, when 42,900 Open Claude instances were found publicly exposed a few weeks back, that was the same kind of basic mistake people do not check in on. So, what you should do with this information, like today, what are you going to do? Honestly, if you're a developer, go look at the leaked code. Don't steal anything, but study the architecture. The tool system design, the permission gating, the multi-agent spawning patterns. These are generally well-engineered solutions that you can learn from. Study the structure, how things go together, not the specifics. Apply those patterns to your own project. So, if you're an Open Claude user, understand that the commercial
13:42tools they're building toward are some things you already have. You're ahead of the curve. Keep building, keep experimenting, keep pushing your agent setup further. Don't just be happy with settling. You know, the features that Anthropic is hiding behind feature flags, you already have running in production today. And if you're Anthropic, maybe double-check your NPM ignore file next time. I don't know. Just saying, but whatever. I'll put all the links to the source, not the source code, but the source of information to like the GitHub repo, X posts, Reddit posts of what people are saying so you can get a little bit more insight. Um you know, the GitHub repo where the source was archived, the Hacker News thread, and the dev.to announcement. Go see it for yourself. It's really
14:27insightful. Give it to your Open Claude agent. See what it thinks. That's just a fun experiment you should try. If you want to learn how to build your own AI agent setup that you have full control over where you don't have to worry about a company accidentally leaking your workflows or changing your pricing or removing features, you got to check out the community. We just hit 177 members after 18 days of launch, and we do six live calls every single week from content creation calls, getting your first customers to build labs to beginner calls to Open Claude specific calls. And we're actually building things. We're not just sitting there watching courses and chatting back and forth. The whole goal is to help you take the next step in your AI journey. I'll put the link to it down below. And if you haven't subscribed to the channel already, we drop AI breaking news, Open
15:14Claude use cases, and all things that have to do with building and building in public. So, hit subscribe, hit the notification bell, and we'll see you in the next video. Be blessed.
Build this with us, live
Shipping Skool is a free community with 4 live build sessions a week. Bring your idea.
Join Shipping Skool β Free





