Anthropic’s AI coding tool, Claude Code, accidentally reveals its source code; here’s what happened

Anthropic, the San Francisco-based artificial intelligence (AI) company, on Tuesday (local time), inadvertently exposed the entire source code of Claude Code, its AI coding tool, NDTV reported.

The source code was exposed due to a basic packaging oversight that, according to security researchers, should never happen in a finished software product.

Security researcher Chaofan Shau on Tuesday found that Claude Code, the AI company’s flagship command-line coding tool, exposed its full source code. The issue stemmed from a 60MB source file map (cli.js.map) bundled within its npm package, which made it possible to recreate the original TypeScript code from the compiled version, the report added.

The npm registry, where the file was hosted, is the largest public repository for software packages and is widely used by developers to distribute and access tools.

What did the source code reveal?

The source code revealed the internal workings of the agentic AI platform. According to media reports, within hours, thousands of developers copied and reposted the approximately 512,000-line TypeScript codebase on GitHub, closely examining its features and internal memory architecture that had previously been accessible only to Anthropic’s engineers.

According to BlockBeats, the leak only affects part of the Claude Code tool itself and does not include user data or the AI’s core systems, so it doesn’t pose a direct risk to regular users. In simple terms, your personal information and chats are safe. However, because the full code is now visible, anyone can see how the tool is built, how it works behind the scenes, and how it handles things like usage tracking and security.

What is source code?

According to the NDTV report, source code is the original, human-readable set of instructions that developers write to create software. When companies release software publicly, the code is usually compiled or packaged into a more compact and less readable form to safeguard a company’s intellectual property and internal logic.

A source map is an additional file used in development that links a program’s compressed, production-ready code back to its original, human-readable version. It helps developers debug and troubleshoot issues more efficiently. However, such files are not meant to be included in public releases, as they can effectively expose the entire underlying codebase.

According to BlockBeats, the latest version of Claude Code (v2.1.88), released on 31 March, still included this file. It reportedly contained the full code for 1,906 proprietary source files, detailing elements such as internal API structures, telemetry systems, encryption mechanisms, and inter-process communication protocols.

Second exposure in a year

Reports suggest that this is not the first time that the AI company has exposed its source code. According to Odaily, a blockchain-focused media platform, back in February 2025, an early version of Claude Code was exposed due to the same reason. At the time, Anthropic removed the old version from the npm and deleted the source map.

Latest

Mamdani puts New York City government back on TikTok

Mamdani puts New York City government back on TikTok

India’s average monthly mobile data consumption crossed 31 GB mark, 5G traffic grew by 70%

The report also said that India has now the world's second-largest 5G subscriber base, 5G data consumption and 5G FWA user base, highlight strong momentum in 5G

Apple Intelligence goes live for iPhone users in China, then pulled back: here’s what happened

Apple had accidentally released the Apple Intelligence update in China to some users but has not pulled it back, according to Bloomberg's Mark Gurman.

Elon Musk doubles down on Grok Imagine after OpenAI’s Sora shutdown: ‘Future of AI is…’

Elon Musk responds to OpenAI's Sora shutdown. The billionaire noted the importance of video generation tools for achieving artificial general intelligence. He a

OnePlus Nord 6 key specifications revealed ahead of launch: 50MP Sony camera, 9,000mAh battery confirmed

OnePlus will be launching the Nord 6 in India on 7 April. Ahead of the launch, the Chinese smartphone maker has revealed many key details about the device.

Topics

Mamdani puts New York City government back on TikTok

Mamdani puts New York City government back on TikTok

Elon Musk must face class action over late disclosure of Twitter stake, judge rules

X-CORP-MUSK-LAWSUIT:Elon Musk must face class action over late disclosure of Twitter stake, judge rules

Israel forging new alliances with key regional countries against Iran: Netanyahu

Netanyahu says Israel forging new alliances with important countries to counter Iran threat

Tiger Woods hydrocodone pills: Did he have a prescription for it? Golfer’s medication details emerge amid crash

Report doesn’t confirm hydrocodone prescription. Woods said he had meds for surgeries, denied illegal drugs; appeared limping, sweating, and talkative.

Tether Cuts Gold Traders Months After Hiring Them From HSBC

Tether Holdings SA has cut two senior precious metals traders just months after hiring them from HSBC Holdings Plc to create what it called “the best trading

Supergirl trailer: Milly Alcock, Jason Momoa lead James Gunn’s gritty superhero film

The trailer of Supergirl: Woman of Tomorrow was released on March 31. Milly Alcock’s Supergirl faces new dangers to protect her loyal dog, Krypto from the ali

‘Today is your last working day…’: Oracle cuts jobs globally, thousands laid off in latest cost cutting move

Layoffs by the software maker appear to have reportedly affected employees in multiple regions across the globe, although the full extent of the cuts is not yet

India warns against forced rules, flags WTO legitimacy risks at ministerial meet

It said that no country should be forced to follow rules it does not agree with, warning that forcing rules without consensus could undermine WTO's legitimacy a
spot_img

Related Articles

Popular Categories

spot_imgspot_img