---
type: "video"
title: "Anthropic Leak: Unveiling Claude AI's Source Code"
summary: "The source code for Anthropic's AI, Claude, was accidentally leaked online, comprising over 500,000 lines of TypeScript code. This inadvertent release exposed Claude’s internal mechanisms, including unreleased features, hard-coded instructions, and unique tools such as a frustration detector. The leak rapidly spread, leading to new derivative projects like Claw Code despite legal takedown attempts by Anthropic."
canonical_url: "https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code"
creator: "Yohann Martzolff"
username: "yohannmtf"
slug: "tragic-mistake-anthropic-leaks-claude-s-source-code"
video_provider: "youtube"
video_url: "https://www.youtube.com/watch?v=mBHRPeg8zPU"
thumbnail_url: "https://i.ytimg.com/vi/mBHRPeg8zPU/maxresdefault.jpg"
published_at: "2026-04-02T07:47:43.096+00:00"
updated_at: "2026-04-02T07:47:43.396208+00:00"
duration_seconds: 500
duration_minutes: 8
language: "en"
transcript_language: "en"
captions_status: "available"
target_question: "What happened during the Anthropic Claude source code leak and what did it reveal?"
captions_url: "https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code.vtt"
---


# Anthropic Leak: Unveiling Claude AI's Source Code

## Summary

The source code for Anthropic's AI, Claude, was accidentally leaked online, comprising over 500,000 lines of TypeScript code. This inadvertent release exposed Claude’s internal mechanisms, including unreleased features, hard-coded instructions, and unique tools such as a frustration detector. The leak rapidly spread, leading to new derivative projects like Claw Code despite legal takedown attempts by Anthropic.

## Key facts

- Canonical URL: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code
- Video URL: https://www.youtube.com/watch?v=mBHRPeg8zPU
- Creator: Yohann Martzolff
- Target question: What happened during the Anthropic Claude source code leak and what did it reveal?
- Published: 2026-04-02T07:47:43.096+00:00
- Updated: 2026-04-02T07:47:43.396208+00:00
- Duration: 500 seconds
- Duration (rounded): 8 minutes
- Time required: 60 minutes
- Captions: available

## Summary

The source code for Anthropic's AI, Claude, was accidentally leaked online, comprising over 500,000 lines of TypeScript code. This inadvertent release exposed Claude’s internal mechanisms, including unreleased features, hard-coded instructions, and unique tools such as a frustration detector. The leak rapidly spread, leading to new derivative projects like Claw Code despite legal takedown attempts by Anthropic.

Sources:
- 0:38-1:11 (#transcript-38160) — 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...
- 2:01-2:33 (#transcript-121200) — Not only that, but somebody else lopforked the leaked code and made it work with any model that they're calling this new project openclaw and it makes projects like open code completely obsolete. But maybe now that th...

## Introduction

This video explores the unexpected leak of Anthropic's Claude AI source code. The event provides insight into the internal workings of an AI system, highlighting both strengths and weaknesses. We will examine the features revealed by the leak and its possible consequences for the AI industry.

Sources:
- 0:00-0:40 (#transcript-160) — 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...
- 2:31-3:05 (#transcript-151599) — 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...

## Audience

This content is designed for advanced AI developers and security researchers who are interested in understanding the implications of the Claude source code leak.

Sources:
- 0:00-0:40 (#transcript-160) — 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...
- 4:53-5:28 (#transcript-293919) — 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...

## Learning Outcomes

- Understand the causes and implications of the Claude source code leak.
- Identify hidden features and internal mechanisms of Claude.
- Recognize the impact of such leaks on AI development and competition.
- Discover how derivative projects like Claw Code emerged.
- Gain insights into Anthropic's internal tools and strategies.
- Analyze the programming structure and use of Claude.

Sources:
- 4:53-5:28 (#transcript-293919) — 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...
- 0:38-1:11 (#transcript-38160) — 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...

## Key Points

- The leak was due to a packaging error involving a source map file.
- Uncovered features include undercover mode and a frustration detector.
- Legal efforts failed to prevent widespread dissemination of the code.
- Competitors can now study and mimic Claude's functions.
- Derivative projects like Claw Code quickly emerged.
- Anthropic's internal security and vulnerabilities were exposed.

Sources:
- 4:53-5:28 (#transcript-293919) — 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...
- 1:08-1:44 (#transcript-68799) — >> I know a lot about the law and various other lawyerings. 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 poiso...

## Step-by-Step Guide

1. Identify the Leak Origin - A source map file was mistakenly included in an npm package.
2. Analyze the Content - More than 500,000 lines of TypeScript reveal numerous internal features.
3. Explore Unrevealed Features - Discover hidden functionalities like undercover mode.
4. Review Legal Actions - DMCA notices were issued but the code spread rapidly.
5. Assess the Impact - Consider the influence on AI innovation and competition.
6. Examine Derivative Projects - Investigate new ventures like Claw Code developed from the leaked source.

Sources:
- 0:38-1:11 (#transcript-38160) — 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...
- 1:08-1:44 (#transcript-68799) — >> I know a lot about the law and various other lawyerings. 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 poiso...

## Tools Used

- Temporal (https://temporal.io)
- Axios
- Bun.js

Sources:
- 0:38-1:11 (#transcript-38160) — 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...
- 1:42-2:02 (#transcript-102320) — 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...

## Important Considerations

- Familiarity with TypeScript and AI development is needed.
- Consider the security and legal implications of using the leaked code.
- Derivative works could infringe existing copyrights.

Sources:
- 0:38-1:11 (#transcript-38160) — 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...
- 0:00-0:40 (#transcript-160) — 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...

## Time Commitment

Estimated time needed: 60 minutes

Sources:
- 0:00-0:40 (#transcript-160) — 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...
- 0:38-1:11 (#transcript-38160) — 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...

## Troubleshooting Guide

- Difficulty accessing original code? – Check community forums for mirrors.
- Legal concerns? – Consult legal experts on allowed usage.
- Struggling with AI terms? – Use online resources or educational courses for clarity.

Sources:
- 1:42-2:02 (#transcript-102320) — 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...
- 0:38-1:11 (#transcript-38160) — 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...

## Action Checklist

- Confirm the source of the code leak.
- Analyze the leaked code content.
- Investigate unreleased features.
- Evaluate legal actions and constraints.
- Consider the impact on AI competition.
- Review new projects from the leak.
- Examine security vulnerabilities.
- Document findings for further study.

Sources:
- 0:00-0:40 (#transcript-160) — 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...
- 2:01-2:33 (#transcript-121200) — Not only that, but somebody else lopforked the leaked code and made it work with any model that they're calling this new project openclaw and it makes projects like open code completely obsolete. But maybe now that th...

## FAQ

- **Q:** What caused the Claude code leak?
  **A:** A source map file was included in an npm package.
- **Q:** What is "undercover mode"?
  **A:** It anonymizes Claude in outputs to prevent exposure.
- **Q:** How did the community respond to the leak?
  **A:** The community quickly mirrored, studied, and developed derivative projects.
- **Q:** What tools are used by Claude?
  **A:** Claude employs Axios along with around 25 other tools.
- **Q:** How did Claw Code start?
  **A:** By translating leaked TypeScript to Python and publishing on GitHub.

Sources:
- 1:42-2:02 (#transcript-102320) — 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...
- 0:38-1:11 (#transcript-38160) — 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...

## Transcript

### 0:00-0:40
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=0s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-160
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:00 a.m. officially making Anthropic more open than Open AI. Within minutes of the leak, Chiao Fan Sha, a security researcher, discovered that version 2.1.88 of the Claude Code MPM

### 0:38-1:11
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=38s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-38160
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, it quickly spread across the internet like wildfire. Anthropic's legal team courageously issued DMCA takedowns. But by the time they woke up in San Francisco, it was already too late. The code was mirrored countless times and cloned by slop tubers like Fireship, which the Supreme Court says I can do legally, by the way, as a worldrenowned journalist.

### 1:08-1:44
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=68s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-68799
>> I know a lot about the law and various other lawyerings. 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 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 refused to

### 1:42-2:02
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=102s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-102320
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.

### 2:01-2:33
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=121s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-121200
Not only that, but somebody else lopforked the leaked code and made it work with any model that they're calling this new project openclaw and it makes 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 pull request 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

### 2:31-3:05
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=151s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-151599
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 ironic 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,

### 3:04-3:25
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=184s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-184080
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 a remote access Trojan on anyone using this package. And in theory, if that happened on anthropic servers, it could be a massive disaster.

### 3:23-3:53
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=203s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-203760
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. Then 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. that somebody already vibecoded a website that breaks down every step.

### 3:51-4:25
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=231s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-231599
But the most interesting part about this codebase is that it contains tons of hard-coded instructions and guardrails that basically beg Claude to please don't do anything weird. 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 ironically, 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

### 4:23-4:56
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=263s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-263759
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 claw 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

### 4:53-5:28
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=293s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-293919
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 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 claude in open source projects so AI code doesn't get scrutinized when it breaks things catastrophically. A very misanthropic

### 5:26-6:00
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=326s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-326240
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. If it 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

### 5:58-6:30
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=358s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-358160
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 infinite 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 Tamagotchi style companion that every developer can customize and raise like a little digital pet. This might just be

### 6:28-7:03
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=388s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-388479
Anthropic's 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 plan, coordinator mode, and demon mode. But 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 Chyris 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. It uses dream

### 7:01-7:34
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=421s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-421599
mode to consolidate memories and does work for you in the background on a specific schedule, but 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'd like it or not. And that's why the most advanced AI labs out there use Temporal, the sponsor of today's video. When you're building an AI application, it's basically a giant distributed system where one flaky API

### 7:32-8:09
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=452s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-452880
can bring the whole thing to its knees. that Temporal is an open-source durable execution platform that solves this problem. It lets you write workflows as normal code that then handles all the plumbing for state management, error handling, and retrying failed steps. And that's especially valuable for more complex jobs because the longer your agent runs, the more likely it is to fail and have to start over from scratch. A temporal will make sure your agent survives and stays on track, so it isn't forced to rerun the same steps and burn a bunch of tokens. OpenAI uses Temporal to orchestrate their workflows for chat GPT images and codecs. And

### 8:07-8:20
Watch: https://www.youtube.com/watch?v=mBHRPeg8zPU&t=487s
Anchor: https://kimbo-topaz.vercel.app/yohannmtf/tragic-mistake-anthropic-leaks-claude-s-source-code#transcript-487199
thousands of nonAI companies like Airbnb and Coinbase use it to power every transaction. Try it out for free today at the link below. This has been the code report. Thanks for watching and I will see you in the next one.
