Anthropic Battles to Contain Claude Code Source Leak

Anthropic is actively trying to contain a leak of its AI tool, Claude Code, by issuing copyright takedown notices. The company is working to remove details about its coding agent from GitHub after its source code was accidentally released.

The company confirmed the leak is real after a user on Tuesday morning discovered that Anthropic had unintentionally included the source code in a 59.8MB file. This file was part of the 2.1.88 release of Claude Code, which has since been deleted.

The discovery led to a surge of interest, and the leaked code quickly spread across thousands of pages on GitHub, a platform used for hosting software projects.

In response, Anthropic began issuing copyright takedown notices to scrub the computer code from the platform. GitHub initially reported processing these notices for an “entire network of 8.1K repositories.”

However, Anthropic later partially retracted the takedown request. The scope was scaled down to just one repository and 96 associated fork URLs.

An Anthropic spokesperson told PCMag that the “Claude Code release included some internal source code.” The spokesperson clarified the situation, stating, “No sensitive customer data or credentials were involved or exposed.”

According to the company, the incident was a “release packaging issue caused by human error, not a security breach.” The spokesperson added, “We’re rolling out measures to prevent this from happening again.”

Despite Anthropic’s efforts, programmers have been working to keep the leaked source code available. Their methods include using AI to rewrite the code into different scripting languages, such as Python and Bash.

The goal of this rewriting is to substantially alter the code to evade Anthropic’s copyright takedowns, which have been successful in removing some GitHub repositories for infringement.

A consultancy focused on AI agents, Systima, commented on the situation, writing, “The source is, for all practical purposes, permanently public.”

Systima also noted what was not included in the leak. “The leak did not expose model weights, training data, or API infrastructure,” the consultancy stated.

The incident could be a significant blow to Anthropic, as it reveals inner workings of its flagship product, Claude Code. This information could be a valuable resource for rival companies looking to enhance their own AI coding tools.

Developers who have examined the leaked file have found it reveals several features. Among them is a technique designed to prevent bad actors from cloning Claude Code.

Another feature discovered is a mode that can strip evidence indicating an AI was responsible for the output. The leak also mentions “KAIROS,” which appears to be an unreleased autonomous agent mode.

A Tamagotchi-style “buddy” companion system was also mentioned in the code, though software engineer Alex Kim suggested this might be an April Fools’ joke.