Claude Code leak: Anthropic pushes its entire source code to the public npm registry
Anthropic accidentally published the entire source code of Claude Code to npm: 512,000 lines of TypeScript with 44 hidden flags and references to a model called Mythos. The code sat in the open for several days on a Cloudflare bucket, until a researcher spotted a configuration error.
AI-processed from TNW; edited by Hamidun News
On March 31, 2026, Anthropic accidentally published the entire source code of Claude Code to the public npm registry. For several days, 512,000 lines of TypeScript stayed openly accessible, until a researcher found a configuration error in Cloudflare and reported it to the company.
What was exposed
The code spanned 1,906 files and contained the full implementation of Claude Code, the tool developers use to automate programming with AI. All of it was stored in a Cloudflare bucket with no basic access protection, available to anyone who knew the right URL.
The leak included more than source code: it also exposed deployment configuration, API keys for integrations with GitHub, Slack and other platforms, and internal documentation on the system's architecture. This is information that normally stays in private repositories and can be used to hunt for vulnerabilities or to reverse-engineer the product.
The scale is striking: 512,000 lines of code amount to the product's full development history, including commits, developer comments and experimental branches.
Hidden flags and the mysterious Mythos
The source code contained 44 hidden feature flags: features Anthropic plans to release but that are currently switched off in public builds. Among them were references to a model with the codename Mythos. Little is known about Mythos itself: the code does not make clear whether it is a new version of Claude or a separate experimental project running on a completely different architecture. But the mere presence of such a hint in published code suggests Anthropic is working on something significant and is keeping it secret from competitors for now.
The leak revealed several interesting details about Anthropic's priorities and plans:
- 44 hidden feature flags in the source code
- A reference to the Mythos model in developer comments
- API keys and configuration for working with external services
- Fragments of documentation on the Claude Code architecture
- Test data and examples for internal use
- The history of all commits with dates and authors
Security as the industry's weak spot
The situation exposes a deep paradox in the AI industry. Companies that talk loudly about AI safety and the need for regulation make basic mistakes when protecting their own code. The leak was not the result of a targeted hacker attack or social engineering, but simply of a misconfigured Cloudflare bucket.
The researcher posted about the leak on social media, and only then did Anthropic remove the code and request its removal from caches. But copies have almost certainly spread across the internet already. The question is how long competitors will spend analyzing this code, and whether they will find anything in the architecture they can use to their advantage.
"This is reminiscent of situations that have happened with other big companies.
Security often stays on the periphery until an incident occurs," said one prominent security specialist, commenting on the incident.
What this means
AI companies are developing at an accelerated pace, but security infrastructure often lags behind. The Claude Code leak is neither the first nor the last incident of its kind. For developers it is a reminder: nobody is immune, not even the industry's recognized leaders. Companies should treat code protection as seriously as they treat protecting their models.
- Nov 1, 2026OpenAI Rewrites GPT Behavior Rules: Five Values and a Chain of Command
- Nov 1, 2026Google admits AI Mode cuts search revenue, shares fall 15%
- Oct 31, 2026Author puts his script before an AI jury: the verdict cost 850 thousand tokens
- Oct 31, 2026Anthropic: Fold Subagents Back Into a Single Loop — One Customer's Tasks Ran Twice as Fast
Key Questions Answered
What was exposed?
The code spanned 1,906 files and contained the full implementation of Claude Code, the tool developers use to automate programming with AI. All of it was stored in a Cloudflare bucket with no basic access protection, available to anyone who knew the right URL. The leak included more than source code: it also exposed deployment configuration, API keys for integrations with GitHub, Slack and other platforms, and internal documentation on the system's architecture. This is information that normally stays in private repositories and can be used to hunt for vulnerabilities or to
What are the key details on Hidden flags and the mysterious Mythos?
The source code contained 44 hidden feature flags: features Anthropic plans to release but that are currently switched off in public builds. Among them were references to a model with the codename Mythos. Little is known about Mythos itself: the code does not make clear whether it is a new version of Claude or a separate experimental project running on a completely different architecture. But the mere presence of such a hint in published code suggests Anthropic is working on something significant and is keeping it secret from competitors for now. The leak revealed several i
What are the key details on Security as the industry's weak spot?
The situation exposes a deep paradox in the AI industry. Companies that talk loudly about AI safety and the need for regulation make basic mistakes when protecting their own code. The leak was not the result of a targeted hacker attack or social engineering, but simply of a misconfigured Cloudflare bucket. The researcher posted about the leak on social media, and only then did Anthropic remove the code and request its removal from caches. But copies have almost certainly spread across the internet already. The question is how long competitors will spend analyzing this code,
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.