Anthropic Leaks Full Claude Code Source Code in npm Accident, Exposing Unreleased Features

Anthropic Leaks Full Claude Code Source Code in npm Accident, Exposing Unreleased Features

N
News Editor 01
2026-07-08 17:44:14
Anthropic accidentally shipped 512,000 lines of TypeScript source code of Claude Code CLI via npm, revealing hidden features like KAIROS, BUDDY, and agent swarms. This is the second such leak in 13 months, sparking concerns over release hygiene.
AnthropicClaude Codesource code leaknpm securityAI coding tools

Anthropic confirmed on March 31, 2026, that it accidentally shipped the complete source code of its Claude Code CLI inside a public npm package, exposing roughly 512,000 lines of TypeScript to anyone paying attention. Security researcher Chaofan Shou, an intern at blockchain security firm Fuzzland, spotted the issue and posted the direct bucket link on X. Within hours, mirrored repositories appeared on GitHub, some accumulating tens of thousands of stars before Anthropic's DMCA takedowns hit. Community members had already begun stripping telemetry, flipping hidden feature flags, and drafting clean-room reimplementations in Python and Rust to sidestep copyright concerns.

Inside the Leak: Unreleased Features and Full Architecture

The ~1,900 TypeScript files covered tool execution logic, permission schemas, memory systems, telemetry, system prompts, and feature flags — a full engineering view of how Anthropic builds a production-grade agentic coding tool. Telemetry scans prompts for profanity as a frustration signal but does not log full user conversations or code. An “undercover mode” instructs the AI to remove references to internal codenames and project details from git commits and pull requests.

Several unreleased features sat behind flags:

  • KAIROS: an always-on background daemon that watches files, logs events, and runs a “dreaming” memory-consolidation process during idle time.
  • BUDDY: a terminal pet with 18 species — including capybara — carrying stats like DEBUGGING, PATIENCE, and CHAOS.
  • COORDINATOR MODE: lets a single agent spawn and manage parallel worker agents.
  • ULTRAPLAN: schedules 10- to 30-minute remote multi-agent planning sessions.

Security and Industry Aftermath

Anthropic told Venture Beat the incident involved no sensitive customer data, no credentials, and no compromise of model weights or inference infrastructure. “This was a release packaging issue caused by human error,” the company said, adding that it is rolling out measures to prevent a repeat. However, this is the second time the same mistake has happened — a nearly identical source-map leak occurred with an earlier version of Claude Code in February 2025. Five days later, a CMS misconfiguration at Anthropic exposed roughly 3,000 internal files covering details on the unreleased “Claude Mythos” model. Two significant accidental disclosures in less than a week raises questions about release hygiene at a company whose tools are actively used to write and ship code at scale.

The March 31 incident also landed alongside a separate npm supply-chain attack on the axios package, active between 00:21 and 03:29 UTC. Developers who installed or updated Claude Code via npm during that window are advised to audit their dependencies and rotate credentials. Anthropic recommends its native installer over npm going forward.

Community Response and Crypto-AI Intersection

Despite Anthropic's DMCA takedowns, the leaked source code remains available in archived and mirrored forms. Community members have already stripped telemetry, enabled hidden features, and drafted clean-room reimplementations in Python and Rust. For the crypto and AI intersection, this event is seen as a reverse-engineering textbook — competitors now have a considerably easier blueprint to build a rival to Claude Code. Ethically, open-source advocates and security researchers are calling for stricter formal verification and automated checks in AI companies' release pipelines.

Anthropic has not published a broader post-mortem or public statement beyond its comment to Venture Beat. As investigations continue, the industry expects stricter npm publishing security standards to emerge.

This article was originally published by Bit.Fan. For more cryptocurrency news and market insights, visit www.bit.fan.
400

Disclaimer:

The market information, project data, and third-party content displayed on this platform are for industry information sharing only and do not constitute any form of investment advice or return commitment.

Cryptocurrency trading carries high risks. Users should fully assess their risk tolerance and make independent decisions. All profits, losses, and legal responsibilities are borne by the users themselves.