Anthropic's hugely popular AI-powered coding tool, Claude Code, has had its entire source code leaked online via a source map file (source map) published in the npm registry.
The leak was discovered on March 31, 2026, when security researcher Chaofan Shou noticed (link leads to X/Twitter) that a large .map file had been accidentally included in Claude Code's npm package, which allowed anyone to restore the original, TypeScript-based source code of Claude Code. Source map files are intended for developers' debugging, but in this case, their careless publication led to over 1,900 files and over 512,000 lines of code becoming publicly available.
The leaked source code was quickly archived in a public GitHub repository, where it garnered thousands of stars and forks in just a few hours. The developer community reacted immediately to the incident: the event is considered one of the most significant AI software source code leaks in recent years. Many industry experts have called the leak a "treasure trove," as it opens an unprecedented view into the architecture and development of a production-grade AI tool.
Claude Code is a command-line-based AI-powered programming solution which, in late 2025, in part, propelled AI development to a new level. In a few months, it has become hugely popular among professional developers and is widely considered the first programming tool capable of producing complete, functional, and tested program code entirely autonomously.
The leak also revealed several unreleased and hidden features. For example, "Buddy" is a Tamagotchi-style AI pet that follows the user on the command line and transforms into different characters based on the username. The "Kairos" mode, in turn, enables a continuously running background AI assistant that retains memory logs and performs proactive tasks even when the user is away from the machine. Furthermore, the code contained references to the system's ability to create multiple parallel agents and integrations with IDE environments, such as VS Code.
The topic is being actively discussed on Reddit and Hacker News, among others.
The leaked source code was quickly archived in a public GitHub repository, where it garnered thousands of stars and forks in just a few hours. The developer community reacted immediately to the incident: the event is considered one of the most significant AI software source code leaks in recent years. Many industry experts have called the leak a "treasure trove," as it opens an unprecedented view into the architecture and development of a production-grade AI tool.
Claude Code is a command-line-based AI-powered programming solution which, in late 2025, in part, propelled AI development to a new level. In a few months, it has become hugely popular among professional developers and is widely considered the first programming tool capable of producing complete, functional, and tested program code entirely autonomously.
The leak also revealed several unreleased and hidden features. For example, "Buddy" is a Tamagotchi-style AI pet that follows the user on the command line and transforms into different characters based on the username. The "Kairos" mode, in turn, enables a continuously running background AI assistant that retains memory logs and performs proactive tasks even when the user is away from the machine. Furthermore, the code contained references to the system's ability to create multiple parallel agents and integrations with IDE environments, such as VS Code.
The topic is being actively discussed on Reddit and Hacker News, among others.









