Skip to content

Claude Code source leak: what happened and what it revealed

A debugging file exposed readable Claude Code source. What the leak revealed about the agent, and why experimental features do not confirm future releases.

Updated October 1, 20264 min read
Claude Code source leak: what happened and what it revealed
On this page

A package can work exactly as intended and still contain files its authors did not mean to publish. Debugging files are easy to overlook because the application can still start and pass its tests with those files included.

That is the failure behind the Claude Code source leak. On March 31, 2026, researcher Chaofan Shou reported that the public npm package exposed readable client code through a source map. InfoQ's account identifies version 2.1.88 and describes roughly 512,000 lines of TypeScript across about 1,900 files.

The exposure gave readers a much clearer view of the software around Claude: tool execution, permissions, memory, and coordination. It also exposed unfinished features and internal references, which require more care to interpret than the initial headlines suggested.

TL;DR A published debugging file made Claude Code's client source accessible. Anthropic described it as a release-packaging error and said no customer data or credentials were involved. The code revealed agent implementation details and experimental features, but it did not expose model weights or establish a confirmed future product roadmap.

How a source map made the client readable

A source map connects generated or minified code to the original source. Debuggers use that mapping to show meaningful filenames and line numbers instead of pointing into a compressed bundle.

Source maps are not inherently private. Some projects publish them deliberately. The problem is publishing a map or linked source that reveals material the release was meant to exclude.

According to InfoQ, the map in this package referenced the unobfuscated TypeScript source on Anthropic's cloud storage, making it downloadable. Zscaler's incident analysis identifies a 59.8 MB map file and explains the connection to the source archive.

The exposure path: the published npm package included a source map that pointed to readable client source.
(Source: Based on InfoQ and Zscaler reporting)

The client already shipped as executable JavaScript, so motivated readers could inspect its bundled code. Original filenames, comments, and module boundaries made that inspection substantially easier. That difference explains why a debugging artifact could attract attention even though the client itself was already distributed.

Anthropic's statement, quoted by InfoQ, called this a “release packaging issue caused by human error, not a security breach.” The company said no customer data or credentials were involved. That describes the reported exposure; it does not make every unofficial mirror safe to run.

What the client code revealed about the agent

The leaked files covered the agent harness, the application code that connects a model to tools, state, and execution. They did not contain the trained weights that make Claude the model.

Terminal listing from Chaofan Shou's disclosure, also reproduced in InfoQ's incident report.
(Source: Chaofan Shou, via InfoQ)

InfoQ summarizes community analysis of a query engine that handles API calls, streaming, caching, and orchestration; permission-gated tools; multi-agent coordination; IDE integrations; and persistent memory. These are distinct engineering responsibilities even when the user sees only a terminal conversation.

For example, a model proposing a shell command is one step. The client still needs to decide whether execution is allowed, run the command, return the result, and preserve enough context for the next decision. If another agent is working in parallel, the application also has to coordinate its output.

That is why inspecting a harness can teach an engineer something useful about tool-using agents. It exposes the control flow around the model. It does not show the model's internal reasoning or prove that every visible guardrail is effective.

How to read the unfinished features

The source contained names that quickly became stories of their own. InfoQ reports three examples:

ReferenceWhat reviewers describedWhat the reference does not establish
KAIROSBackground-agent behavior and idle-time memory consolidationPublic availability or permission to act on any user's files
ULTRAPLANWork on offloading complex planning to cloud infrastructureA final product design or guaranteed capability
BUDDYA virtual pet with species, rarity tiers, and statsA release date from source presence alone

A feature flag controls whether a code path is enabled. A feature can be present in a repository while disabled in a distributed build, restricted to an internal environment, or left over from an experiment.

The same caution applies to model codenames. Reporting offered different interpretations of names such as Capybara. A string in a client is evidence of a reference, not enough to confirm the identity, release schedule, or performance of a future model. A roadmap chart that joins those names into a definite product hierarchy goes beyond what the code alone can support.

Why Undercover Mode drew attention

InfoQ's report describes an internal subsystem intended to prevent disclosure when contributing to public repositories. Its instructions concerned internal codenames, unreleased versions, company-specific information, and AI attribution.

Those instructions raise two separate questions. Preventing internal project names from appearing in public code is an ordinary confidentiality concern. Removing AI attribution is a separate choice about how contributions are represented.

The existence of that code does not establish that every public Claude Code user had the mode enabled, or that the client concealed arbitrary actions. To assess its effect, a reviewer needs the activation conditions, build configuration, and the actual instructions applied to a run.

Keeping those distinctions visible makes the discussion more useful than treating a suggestive module name as proof of everything a model might conceal.

What to change in a release pipeline

The practical lesson is to inspect the release artifact itself. Passing application tests does not tell you which files will land in a package registry or which source URLs a build exposes.

For an npm project, npm pack --dry-run lists the files that would be included. An explicit files list in package.json, appropriate ignore rules, and a check of generated source-map references can make the intended package contents reviewable. Debugging material can be stored separately when it should not be public.

Also separate inspecting leaked code from trusting a runnable mirror. Zscaler documented a malicious repository posing as an enhanced version of Claude Code. That is a concrete reason to use official installation channels, independent of the original packaging error.

The leak made the client easier to study and exposed work that had not been presented as a public product. The durable engineering lesson is narrower: decide what belongs in a release, inspect what the build actually produces, and test that boundary before publishing.

Sources

Common questions

What was the Claude Code source leak?

On March 31, 2026, researcher Chaofan Shou reported that Claude Code's npm package exposed readable client source through a source map. Reporting identified version 2.1.88 and roughly 512,000 lines of TypeScript across about 1,900 files.

How did the Claude Code source map expose code?

The debugging file linked the bundled program to its original source and referenced source material hosted on Anthropic's infrastructure. Publishing that file made the client much easier to inspect than its minified JavaScript bundle.

Did the Claude Code leak expose model weights or customer data?

The reported exposure concerned the client-side agent code, not Claude's model weights. Anthropic's statement, reported by InfoQ, said no customer data or credentials were involved.

What did KAIROS and BUDDY mean in the leaked source?

Reviewers described KAIROS as background-agent work and BUDDY as a virtual pet feature. Their presence in source established that related code existed, but did not by itself establish public availability or a release date.

Did the leak confirm Anthropic's future model roadmap?

It exposed internal references that commentators used to infer a roadmap. Codenames and feature flags can refer to experiments or inactive paths, so they are not sufficient evidence of a confirmed model identity, capability, or launch plan.