Claude Code source code leak
Published on
5 min read

Anthropic Assesses Risks After Claude Source Code Leak Exposes ‘autoDream’ Agent

In Focus

  • Source code leaked after Anthropic released the Claude Code 2.1.88 update
  • The leak revealed Anthropic’s AI memory optimization system
  • It also exposed Claude Code’s always-on agent, Kairos.

Anthropic’s Claude Code source code leak revealed important details about the chatbots’ architecture, under-development features, and memory utilization. A report by Gadgets360 shows the incident may have revealed the AI lab’s critical source code to competitors and bad actors who might exploit the system.

How Did Claude Code Leak?

Anthropic announced the release of the Claude Code 2.1.88 update on March 31, 2026. The update introduced 41 command-line interface changes and three system prompt changes. But the file reportedly contained a section of Anthropic’s source code.

Soon after the AI developer announced the release on X, users started posting that the released file contained a package manager for JavaScript and a map file in the npm registry.
Reporting about the Anthropic AI code leak, VentureBeat said the file containing more than 512,000 lines of TypeScript codebase was mirrored on GitHub.

Developers analysed it within hours. In an email to the news outlet, Anthropic confirmed that the leaked code revealed Claude Code’s internal architecture, operations, and hidden features.

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,” Anthropic stated in the email.

Why Does the Claude Code Leak Matter to Anthropic?

The Claude Code leak exposed Anthropic’s AI memory optimization system. This system is designed to reduce output errors and hallucinations. The leak also exposed Claude Code’s always-on agent, Kairos. The AI agentic feature is mentioned over 150 times in the leaked source code.

The agent reportedly uses a process known as “autoDream” to consolidate memory when Claude users are idle. It also clears memory, merges disparate observations, converts vague insights, and eliminates logical contradictions. The leak came shortly after Anthropic expanded Claude Code from an AI assistant to a Computer agent that completes tasks autonomously.

The Tamagotchi-style buddy system was also revealed by the code base leak. The system includes a future feature capable of responding to user prompts and outputs shared by Anthropic’s Claude Code. The system also responds to prompts that mention ‘snark’ or ‘chaos’ and appears to be designed to enhance the personality and interactivity of the platform.

What Next for Anthropic?

Anthropic is still assessing the widespread risks associated with the code base leak. The always-on agent and memory optimization features give Claude Code a competitive advantage in terms of quality and accuracy. Their exposure could result in rivals such as Google and OpenAI developing similar mechanisms.

For Anthropic, the code lead is not just a security lapse. It’s a strategic exposure of its intellectual property. The company also views the timing as suspect, given the commercial growth of Claude Code. In recent months, Anthropic has recorded significant growth with its annualized revenue run-rate reaching $19 billion as of March 2026.

Linda Hadley
Scroll to Top