The entire source code for Anthropic’s Claude Code command-line application has been leaked due to an internal error. This gives competitors and enthusiasts a detailed look at how Claude Code operates.
Listen to the article
Hear the article with natural AI narration.
AI explained
What happened in the Claude Code source code leak?
Anthropic accidentally released the full source code of its Claude Code command-line application through a source map file included in an npm package update. The leak exposed nearly 2,000 TypeScript files and over 512,000 lines of code, which were then shared publicly and analyzed by developers.
- Summary: The leak was caused by a packaging error, not a security breach, and did not expose customer data or credentials.
- Why it matters: The exposed code provides detailed insights into Claude Code’s architecture and memory systems, allowing developers and competitors to study and potentially improve similar tools.
- Key point: The leak offers a rare opportunity to examine Anthropic’s implementation details, accelerating development and security analysis in related AI applications.

Anthropic Claude Code Leaked via Source Map File
This morning, Anthropic released version 2.1.88 of the Claude Code npm package. It was quickly discovered that the package included a source map file, which provided access to the full source code of Claude Code, consisting of nearly 2,000 TypeScript files and over 512,000 lines of code. Security researcher Chaofan Shou was the first to publicly point this out on X, sharing a link to an archive containing the files. The codebase was then posted to a public GitHub repository, where it has been forked tens of thousands of times.
Anthropic publicly acknowledged the mistake in a statement to VentureBeat and other media outlets, clarifying that no sensitive customer data or credentials were involved or exposed. This was an issue with release packaging caused by human error, not a security breach. Developers have already begun analyzing the code. For example, @himanshustwts posted a detailed overview on X of Claude Code’s memory architecture, describing systems like background memory rewriting and various steps to verify memory validity before use. Others have analyzed how many lines of code make up different components, providing valuable insights to competitors. While Anthropic’s trade secrets have some legal protection, the leak offers insights that could help improve existing architectures and develop competing tools.
What’s Next?
AIny brief assessment: The leak of Claude Code’s source code offers U.S. developers an opportunity to learn from Anthropic’s approach. This could accelerate the development of similar tools in the American market. At the same time, it presents chances to identify and patch security vulnerabilities in existing systems.
Source: Ars Technica
Read the full story in Norwegian
Les pĂĄ norskRead also: StrictlyVC 2026: AI Innovators Gather in San Francisco

