Under the Hood: Inside the Anthropic Code Leak Pointing to Claude Sonnet 4.8
An accidental npm package leak has exposed Anthropic's upcoming Claude Sonnet 4.8 model and several unreleased agentic features.
On March 31, 2026, Anthropic inadvertently shipped a detailed technical roadmap inside a public software update, exposing the names and features of its upcoming artificial intelligence models. The incident occurred when the AI startup uploaded a JavaScript source map file, `cli.js.map`, with version 2.1.88 of its `@anthropic-ai/claude-code` npm package, exposing approximately 512,000 lines of internal TypeScript source code.
The leak was quickly discovered and flagged online. Security researcher Chaofan Shou publicly reported the leak on X, warning that "Claude code source code has been leaked via a map file in their npm registry!" While Anthropic moved swiftly to pull the affected package version, public mirrors of the leaked code had already mirrored the file, keeping it accessible to researchers and analysts.

Anatomy of the Developer Error
Inside the massive text file lay explicit references to unreleased models, including "sonnet-4-8," "opus-4-7," and a mysterious codename, "mythos." Boris Cherny, Anthropic's Head of Claude Code, later characterized the slip-up as a "plain developer error."
An Anthropic spokesperson subsequently clarified that the incident was a release packaging issue caused by human error, not a security breach, adding that no customer data or credentials had been exposed. Despite the rapid containment, the leaked strings provided an unprecedented look into the company's internal model development pipeline.
Validating the Roadmap
Initially, some observers questioned the accuracy or recency of the leaked configuration files. However, the credibility of the leak was validated when Anthropic officially launched Claude Opus 4.7 on April 16, 2026—just 16 days after the model's designation appeared in the leaked `@anthropic-ai/claude-code` package. Anthropic followed this on May 28, 2026, with the official launch of Claude Opus 4.8, confirming a rapid cadence of updates to its most capable model tier.

The presence of "sonnet-4-8" in the original leak has now become the focal point of intense industry speculation. As of June 6, 2026, Claude Sonnet 4.8 has not been officially announced or released. Because Sonnet-tier models are typically balanced to optimize cost-effectiveness, speed, and capability for high-throughput production workloads, an upgraded Sonnet 4.8 could dramatically lower the barrier to entry for developers seeking state-of-the-art agentic performance.
An Unprecedented Generational Jump
Historically, Anthropic has synchronized the version numbers of its core models. The current Sonnet model in production remains Claude Sonnet 4.6. The leak suggests Anthropic will skip version 4.7 entirely for Sonnet, leaping directly to 4.8 to match the latest Opus release.

"A 'Sonnet 4.8' string appeared in a Claude Code source-map leak on March 31. Anthropic has shipped nothing. Polymarket is at 3% for today. And a version jump from 4.6 → 4.8 (skipping 4.7) would be unprecedented for Anthropic. Here's the honest read," noted an anonymous industry analyst on May 24, 2026. This potential deviation in Anthropic’s release cadence points to a strategic choice to consolidate minor upgrades into a larger, more impactful generational leap.
Hidden Features: KAIROS and Auto-Dream

The leaked TypeScript files also revealed a suite of advanced developer tools and agentic features currently in development. Among the most notable discoveries are:
* KAIROS: Described in the code as an always-on, persistent agent designed to run background workflows.
* Auto-Dream: A background memory consolidation system aimed at optimizing context windows and long-term memory retrieval for agentic sessions.
* Undercover Mode: A utility intended to automatically strip internal Anthropic developer metadata and identifiers from public Git commits.
* Mythos: A codename that was later partially confirmed by Anthropic to power Project Glasswing, a highly specialized internal initiative focusing on advanced cybersecurity research.
Market Impact and the Path to October
This accidental disclosure comes at a time of heightened competition and supply chain sensitivity. On the same day Anthropic's package leaked, a separate, coincidental supply chain attack compromised the Axios npm package—a primary dependency of Claude Code. While unrelated, the twin events highlighted the growing cybersecurity risks facing modern developer environments.
Anthropic is currently locked in a fierce battle for market share against OpenAI's GPT-5.6 and Alibaba's Qwen 3.7 Max, both of which are aggressively targeting the cost-efficient developer market. With a rumored target of an Initial Public Offering (IPO) in October 2026, delivering Sonnet 4.8 alongside these advanced agentic capabilities is critical for Anthropic to secure enterprise dominance and satisfy investors ahead of its public debut.
