Claude Code source code leak

Anthropic Leaked Its Own AI. Here's What Was Inside.

April 01, 2026

Someone on Anthropic's team forgot to add *.map to their .npmignore file. That one mistake put 512,000 lines of Claude Code's source code on the internet for anyone to grab.

It happened on March 31st. Version 2.1.88 of the @anthropic-ai/claude-code npm package shipped with a 59.8MB source map file pointing to a publicly accessible zip archive on Anthropic's Cloudflare storage. The internet noticed fast. By the time Anthropic started sending DMCA takedowns, it was already mirrored everywhere.

This is the second time in about a year. A nearly identical packaging error happened in February 2025. Same mistake, different day.

What Actually Got Exposed

Nearly 2,000 files across the full codebase. But the parts that got the most attention weren't the algorithms. They were the instructions.

The system prompts. Claude Code runs on detailed behavioral instructions telling the model how to act, what tools it can use, and what constraints to follow. Those are now public. That matters because understanding the instructions is the first step toward working around them.

Undercover Mode. This one surprised people. There's a subsystem specifically built to keep Claude from revealing it's Claude when it contributes to public open-source repos. The prompt reads: "You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Do not blow your cover." Make of that what you will.

44 unreleased feature flags. Fully built but not yet shipped. Competitors now have a complete roadmap of what's coming. That's a significant intelligence leak for a company in the middle of a product arms race.

KAIROS. An unreleased background agent that can run tasks, fix errors, and send push notifications without waiting for human input. Persistent, autonomous, always-on. That's a significant product announcement buried in an accidental leak.

Why This Matters for Businesses Using AI

There are a few layers here worth separating out.

First, the security angle. Knowing how Claude Code's guardrails work makes it easier to find the edges. For enterprise teams in regulated industries, the fact that the internal prompt logic is now fully public is a real risk they'll need to account for.

Second, the transparency question. A lot of people who build on top of AI tools have been asking for more visibility into how these systems actually work. This leak forced that conversation. Whether you think system prompts should be public or private, the argument just got a lot more concrete.

Third, process. Anthropic is one of the most safety-focused AI companies out there. If they've made this same packaging error twice in 13 months, it's worth asking what that says about the gap between stated values and operational discipline. It's not a character flaw. It's an ops problem. But ops problems have consequences.

The Permanence Problem

Anthropic's DMCA takedowns haven't worked. The code is mirrored across decentralized repos and is not coming down. GitHub repositories collecting AI system prompts are already updated with everything from this leak.

This is the new reality for any company building AI systems: assume your system prompts will eventually be public. Build accordingly. Design your safeguards to hold up even when the prompts are known, not just when they're secret.

Security through obscurity was always a weak strategy. This week just made that point louder.

What to Watch

The KAIROS feature is the most interesting thread here. A persistent background agent that operates autonomously and sends push notifications is a meaningful shift in how AI assistants work. It's not a chatbot anymore. It's closer to an employee.

When Anthropic ships that officially, it'll be a big deal. For now, we know it exists, we know how it's designed, and we know it was close enough to done that it made it into production code.

Sometimes the most important product announcements aren't the ones companies plan.

Mark Garza

Mark Garza

Mark is an automation and AI growth strategist and the founder of Laimen AI.

LinkedIn logo icon
Back to Blog