TLDR
- Anthropic accidentally leaked internal source code for its AI coding tool, Claude Code
- The leak exposed roughly 1,900 files and 512,000 lines of code
- A post on X sharing the code got over 30 million views
- Anthropic says no customer data or credentials were exposed
- This is the second data incident for Anthropic in less than a week
Anthropic confirmed on Tuesday that it accidentally released part of the internal source code for Claude Code, its AI-powered coding assistant. The company called it a “release packaging issue caused by human error, not a security breach.”
Claude code source code has been leaked via a map file in their npm registry!
Code: https://t.co/jBiMoOzt8G pic.twitter.com/rYo5hbvEj8
— Chaofan Shou (@Fried_rice) March 31, 2026
The leak exposed around 1,900 files and 512,000 lines of code, according to cybersecurity analysts. Claude Code runs directly inside developer environments and has access to sensitive information, which made the exposure a concern for security experts.
A post on X sharing a link to the leaked code went viral fast. It had already passed 30 million views after being shared in the early morning hours of Tuesday.
Developers began going through the code to understand how Claude Code works and how Anthropic plans to develop it further. Some security researchers raised concerns about what attackers could do with the information.
AI cybersecurity firm Straiker warned in a blog post that attackers could now study how data flows through Claude Code’s internal pipeline. They said it could allow someone to craft payloads that persist across long sessions, effectively planting a backdoor.
A Second Incident in One Week
This was not an isolated event for Anthropic. Just days earlier, Fortune reported that the company had accidentally made thousands of files publicly accessible.
Those files included a draft blog post describing an upcoming AI model known internally as both “Mythos” and “Capybara.” The post reportedly noted that the model presents cybersecurity risks.
Anthropic said it is rolling out measures to prevent future incidents. The company stated clearly that no sensitive customer data or credentials were involved in either case.
Claude Code by the Numbers
Anthropic released Claude Code to the general public in May of last year. It helps software developers build features, fix bugs, and automate tasks.
The tool has grown quickly. Its run-rate revenue had reached more than $2.5 billion as of February.
That growth has pushed competitors to act. OpenAI, Google, and xAI have all put resources into building their own coding tools to compete with Claude Code.
Anthropic was founded in 2021 by former OpenAI executives and researchers. It is best known for its family of Claude AI models.
The company’s spokesperson said it is taking steps to make sure this kind of leak does not happen again.







