A file containing part of the source code appears to have been leaked with the recent Claude Code 2.1.88 update.
Photo Credit: Unsplash/Goran Ivos
A hidden “buddy” system that adds a Tamagotchi-style terminal pet in Claude Code was also found
Anthropic might have accidentally leaked part of its source code for Claude Code. As per reports and social media posts from users, the information was leaked with the latest Claude Code 2.1.88 update, revealing critical details about the product's architecture, memory utilisation, and under-development features. The reported accident could also reveal the company's critical source code to rival companies that might become aware of these implementations, and bad actors who might find ways to exploit the system.
On Tuesday, Anthropic released the Claude Code 2.1.88 update, which introduced multiple command-line interface (CLI) and system prompt changes. However, soon after the update was released, several X (formerly known as Twitter) began posting about the package containing a map file in the npm registry, a package manager for JavaScript. The file is said to contain a part of the source code of the platform.
Ars Technica and VentureBeat separately reported that the file containing code, which contains more than 5,12,000 lines of TypeScript code, was quickly mirrored across GitHub and was analysed by developers. It reveals the inner workings of how the agentic coding platform works, as well as several hidden features.
Notably, VentureBeat stated that the leak was confirmed by an Anthropic spokesperson in an emailed statement, which said, “Earlier today, a Claude Code release included some internal source code. No sensitive customer data or credentials were involved or exposed. This was a release packaging issue caused by human error, not a security breach. We're rolling out measures to prevent this from happening again.”
The most revealing information is Anthropic's memory architecture, which is aimed at reducing the errors in output and instances of hallucinations. The company, reportedly, ditched the retrieval system where every piece of data is stored for a more complex and better-organised three-layer memory architecture, which is said to include a self-healing element to it.
Put simply, the foundation layer only stores locations instead of data. These locations are then accessed by agents who procure topic files based on the prompts. The report claims that a strict discipline is maintained, which lets agents update the index only after a successful file write. This means whenever there is a failed attempt, the file is simply not written, avoiding the chance of bad data contamination.
Another interesting revelation is Kairos, a feature that is said to be mentioned more than 150 times in the leaked source code. It is said to be an agentic operation that allows Claude Code to act as an always-on agent. The publication claims that the agent uses a process dubbed “autoDream,” which performs memory consolidation whenever the user is idle. It essentially performs a memory cleanse, merging disparate observations, removing logical contradictions, and converting vague insights into facts.
Finally, a Tamagotchi-style buddy system was also found within the code base. This appears to be a future feature, showing evidence for a terminal pet that can react to the user prompts and the output shared by Claude Code. Able to react with snippets mentioning “chaos” and “snark,” it is more of a quality-of-life change that brings more interactivity and personality to the platform.
Wider risk to Anthropic is still being assessed. The memory optimisation and the always-on agent are unique internal mechanisms that give Claude Code the edge against rivals when it comes to coding accuracy and quality. With rivals being aware, it could lead to platforms, such as OpenAI's Codex and Google's Antigravity IDE, implementing similar mechanisms.
Worrying still is the risk of this information reaching bad actors and hackers, who might devise specific tools and mechanisms to target the vulnerabilities in Claude Code. Anthropic has reportedly highlighted that it is rolling out measures to prevent such misuse.
Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.
Honor X80i Launched With 7,000mAh Battery, MediaTek Dimensity 6500 Elite Chip: Price, Specifications