Anthropic has confirmed a leak of Claude Code's source code, revealing features and exposing potential risks to its competitive position.
Anthropic has acknowledged a significant leak of its Claude Code source code, as reported by CNBC. Company representatives clarified that no confidential customer data was compromised, attributing the breach to a packaging error rather than a security hack.
“We are implementing measures to prevent this from happening again,” the representative stated.
The leak, which originated on March 31, generated considerable attention on social media, with a related post on X receiving over 30 million views. The message pointed out how the code was exposed through a map file in the npm registry.
"Claude code source code has been leaked via a map file in their npm registry!" — Chaofan Shou (@Fried_rice) March 31, 2026
This incident could harm Anthropic's market position, giving competitors insights into the architecture of Claude Code. The exposed source code provides details on how the tool manages requests, coordinates multiple assistants, and handles user permissions and authorization.
Moreover, the leak unveiled 44 undocumented features, including:
- Kairos — a background system designed to retain memory and analyze data for retraining;
- Buddy — an AI pet feature reminiscent of Tamagotchis, expected to launch shortly.
Another noteworthy disclosure is the Undercover Mode, which aims to prevent the accidental release of internal project names.
Contextualizing the Leakage Amidst Competition
This incident follows a previous leak where descriptions of a forthcoming AI model were made public due to human error. Anthropic described the upcoming model as a significant advancement in AI capabilities and is currently testing it with a select group of users.
Claude Code was released to the public in May 2025 and has rapidly gained traction among developers for its ability to fix bugs and automate tasks. The competition has intensified, prompting OpenAI to discontinue its Sora project to pivot resources towards similar offerings from Anthropic. Notably, Anthropic recently enhanced Claude by enabling it to operate as an AI agent, capable of performing computer tasks on its own.