Claude source code leaked by Anthropic, gives everyone a look inside how viral chatbot works

Anthropic has once again accidentally exposed sensitive information related to its Claude AI family. This time, it’s the internal source code of its AI coding assistant, Claude Code. The leak, which surfaced on March 31, 2026, was not the result of a cyberattack or hack, but likely a basic packaging mistake. The company recently rolled out an update, during which developers noticed that the release package contained a source map file, something that is never meant to be publicly distributed.
The leak first came to light when security researcher Chaofan Shou found that Claude Code’s latest update (version 2.1.88) included a source map file in its npm package. This file, called cli.js.map, essentially can allow anyone to rebuild and view the tool’s original code. Within hours, the leak, the source map spread across developer communities, with users downloading, analysing, and sharing the exposed code online. The leak was likely caused by a simple technical error during the update process. However, in this case, Anthropic accidentally included a source map file in the public release. Such files are meant only for internal use, as they link the compiled software back to its original source code to help developers debug issues. By shipping this file as part of the npm package, the company effectively made it possible for anyone to reconstruct and access the full codebase. This exposed the internal workings of Claude Code, including its underlying architecture and design.In short, the leaked code gives people a blueprint of how the Claude Code actually works.
According to reports, the leak exposed more than 500,000 lines of Claude Code’s source code, spread across nearly 2,000 internal files.This included important parts of how the Anthropic’s AI tool works, such as:
– Internal APIs (how different parts of the system connect)
– Telemetry and analytics systems
– Some encryption-related logic
– Communication between different components
Developers who explored the code also found hints of upcoming features and experiments. These include a Tamagotchi-like assistant that reacts while you code, and a feature called “KAIROS,” which could enable an always-on AI agent working in the background.

Be the first to comment

Leave a Reply

Your email address will not be published.