- Anthropic leaked Claude Code's full source code via a 60MB source-map file in npm package
- Leak exposed internal architecture, features, and tooling but not model weights or user data
- Cybersecurity experts criticized the basic packaging error despite Anthropic's strong security claims
The leak of Claude Code's source code from Anthropic has sent shockwaves through the AI community, raising concerns about security, strategy, and intellectual property. What makes it particularly notable is that Anthropic, an American artificial intelligence company, has built its reputation around strong security practices and strict controls, yet the leak stemmed from a basic packaging oversight. The leak happened on March 31 when Anthropic inadvertently leaked the complete source code for its flagship coding assistant, Claude Code, via a misconfigured source map file in the company's npm registry.
Cybersecurity professionals criticised the lapse, stating how even leading AI firms may be lagging in operational security, raising concerns about future risks as AI systems become more autonomous. The leak is also seen as a blow to Anthropic's operational reputation, especially as it reportedly prepares for a $380 billion IPO.
On the internet, the leak has triggered intense reactions, with many users both criticising and mocking the operational security practices at Anthropic and pointing out the obvious irony. Shakthi Vadakkepat, an active Enterprise AI Architect, called the lapse "the mothership of all code leaks," noting how the leak stemmed from something as basic as shipping a map file within an npm package.
"The big deal is that Anthropic is a company that prides itself on the level of security and controls they have in place, and then they ship a map file in their npm. The other thing is that they'll have a tough time suing the guy who created the repo on GitHub because he has essentially ported the code to Python, hence making the DMCA inapplicable here. And the logical argument would be that nothing was "hacked" per se; Anthropic essentially shipped the map file themselves," he wrote on X.
This is the mothership of all code leaks! The code of #ClaudeCode has been leaked!
— Shakthi (@v_shakthi) April 1, 2026
The big deal is that #Anthropic is a company that prides itself in the level of security and controls they have in place and then they ship a map file in their npm!
The other thing is that… https://t.co/fTWGw8s54j
To make the technical lapse easier to understand, another user compared it to a homeowner investing heavily in security, locking doors, installing surveillance systems, and hiring guards, only to accidentally publish the detailed layout of the house online for anyone to access.
"This is the same company that told Congress AI is an existential threat... the same company that spent $8 billion building 'the most safety-focused lab on earth'... the same company the Pentagon blacklisted as a 'supply chain risk' because they were supposedly TOO principled... and they got exposed by a config file that any mid-level engineer would've caught in a code review," the user added.
"The company telling the world how dangerous AI is… couldn't protect its own code from a rookie mistake. These are the people advising governments on regulation. Testifying about existential risk. Asking to be the ones trusted with the most powerful technology ever built. And they just shipped their own blueprints to the public by accident," another user commented.
Check out other reactions and memes flooding the internet:
🚨 Do you understand what just happened to Anthropic..
— Tuki (@TukiFromKL) March 31, 2026
someone on their team ran a production build of Claude Code.. the compiler generated a .map file.. which is literally a blueprint that reverses the entire codebase back to its original source.. and then they published it… https://t.co/3AQKn5DnW1 pic.twitter.com/kCKq9QlWKk
> Anthropic ships Claude Code as an npm package
— BuBBliK (@k1rallik) March 31, 2026
> someone runs `ls` on the source map
> entire codebase just sitting there. unobfuscated.
> plugins, skills, tools, hooks, commands - everything
> internal architecture of the most hyped AI coding agent, fully readable
> Anthropic… https://t.co/UFdCa7YCsu pic.twitter.com/YjFrxklyHl
🚨 This is insane.
— Aman (@Amank1412) March 31, 2026
Claude Code just got fully leaked.
$2.5B+ revenue run rate.
2x growth in months.
2026 just got crazy. https://t.co/j5vVtrRTE5 pic.twitter.com/nGqWAjuAIy
BIGGEST AI LEAK OF 2026 JUST DROPPED
— shirish (@shiri_shh) March 31, 2026
Anthropic “super safe” AI company accidentally shipped its entire Claude Code source code in a public npm package.
thousands of lines of their secret sauce, agent brains, hidden features, and internal magic… now public on GitHub for… https://t.co/RB3he5q37J pic.twitter.com/cJ162kE9oX
“babe wake up.”
— dev (@zivdotcat) March 31, 2026
Claude Code is finally open source https://t.co/Yk5jXU6fyd pic.twitter.com/717NTwDHVT
Developers and techies, meanwhile, have reacted with enthusiasm, sharing and analysing the code across forums and repositories, calling it a valuable learning resource rather than a crisis.
Notably, security researcher Chaofan Shou discovered the leak when he found out that Claude Code had its entire source code compromised via a 60MB source-map file (cli.js.map) in its npm package. This file allowed anyone to reconstruct the full TypeScript codebase, essentially exposing the underlying architecture of Claude Code. The exposed code includes the CLI implementation, agent architecture, unreleased features, and internal tooling - but not the model weights or user data. Anthropic confirmed the leak was due to human error and not a security breach.
"No sensitive customer data or credentials were involved or exposed. This was a release packaging issue caused by human error, not a security breach. We're rolling out measures to prevent this from happening again," an Anthropic spokesperson said in a statement, as per CNBC.
Claude Code is a sophisticated AI coding assistant that enables users to edit files and manage projects locally.
Track Latest News Live on NDTV.com and get news updates from India and around the world