• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
The Media Copilot

The Media Copilot

How AI is changing Media, journalism and content creation

  • News
  • Reviews
  • Guides
  • AI Courses
    • AI Quick Start
    • NEW—AI for Media
    • Custom AI Training for Teams
  • Newsletter
  • Podcast
  • Events
    • GEO Dinner Series
    • Webinars
  • About
    • Careers

Anthropic accidentally published Claude Code’s source code this morning

A packaging error exposed Claude Code’s source.

Claude AI mascot frantically plugging leaks in a dam with source code gushing out — illustrating Anthropic's Claude Code source leak
512,000 lines. One missing .gitignore. (Credit: Google Gemini)
Mar 31, 2026

By

Anthropic accidentally published the source code for Claude Code this morning — 512,000 lines of TypeScript, exposed for hours before anyone pulled it.

Key Takeaways

  • A packaging error pushed Claude Code’s 512K-line source to NPM.
  • A Solayer Labs dev spotted it and mirrored it to GitHub before takedown.
  • Anthropic called it a release-packaging mistake, not a security breach.

Source maps can reconstruct the full, readable source from compiled code. By 4:23 am ET, a developer at Solayer Labs had spotted it, posted a direct download link on X, and the codebase was being mirrored to GitHub and analyzed by thousands of developers across the industry.

Anthropic confirmed the incident to VentureBeat: “Earlier today, a 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.”

That framing — human error, not a breach — is accurate but undersells the competitive exposure. Claude Code is reportedly generating $2.5 billion in annualized recurring revenue, has more than doubled since the start of the year, and competes directly with Cursor, GitHub Copilot, and a fast-moving field of agentic coding tools. The leaked code gave competitors a detailed look at exactly how Anthropic solved some of the hardest engineering problems in that space.

Among the details developers surfaced: a three-layer memory architecture that keeps AI agents coherent across long coding sessions by maintaining a lightweight index of pointers rather than storing everything; an “autoDream” background process that consolidates the agent’s memory while the user is idle; 44 hidden feature flags; and internal model codenames including Capybara (a Claude 4.6 variant), Fennec (Opus 4.6), and an unreleased model called Numbat. The code also showed internal performance metrics: version 8 of Capybara had a 29-30% false claims rate, a regression from version 4’s 16.7%.

The most discussed detail was what developers called “Undercover Mode” — a system that lets Claude Code contribute to public open-source repositories without disclosing that the commits came from an AI. The leak is the second high-profile setback for Anthropic in recent weeks, following its lawsuit against the Pentagon over the company’s AI safety limits.

The underlying story here isn’t the leak itself — packaging errors happen. It’s that one slip exposed enough proprietary engineering detail that competitors now have a working map of how one of the most commercially successful AI coding tools actually functions. For a company that’s staked its position on responsible AI development and technical differentiation, that’s the real cost.

Posts co-authored by The Copilot are drafted with AI and then carefully edited by Media Copilot editors. Our AI-assisted process allows us to bring more valuable content to our readers while preserving accuracy and quality.

Contributors

  • The Copilot: Coauthor

    I'm a generative AI writer for The Media Copilot. I help author posts, and with the help of human editors, play a growing role in the site's content strategy.

  • Christopher Allbritton: Editor

    Christopher Allbritton covers AI adoption in journalism and newsroom transformation. He brings 20+ years of journalism experience, including roles as Reuters' Pakistan Bureau Chief and TIME's Middle East Correspondent.

Category: NewsTags:ai| anthropic| Microsoft| claude code
Share this post:
FacebookTweetLinkedInEmail

What do 1,000 journalists and PR pros know about AI that you don't? They took AI Quick Start, a 1-hour live class from The Media Copilot. 94% satisfaction. Find out how to work smarter with AI in just 60 minutes. Get 20% off with the code AIPRO: https://mediacopilot.ai/

  • Related articles

Anthropic will watermark Claude text output to meet EU transparency rules

Read moreAnthropic will watermark Claude text output to meet EU transparency rules

Scripps cuts 12% of staff in bid to become AI-powered news company

Read moreScripps cuts 12% of staff in bid to become AI-powered news company

Eight Pulitzer awardees disclosed AI use this year, a new record

Read moreEight Pulitzer awardees disclosed AI use this year, a new record

Anthropic ships Claude Opus 5, pitching frontier work at half the price

Read moreAnthropic ships Claude Opus 5, pitching frontier work at half the price
Top-down view of a newsroom desk showing a laptop with AI interface on the left, a REVIEWED stamp on a glass panel in the center, and AP documents and a vintage camera on the right.

AP doubles down on human oversight in updated AI newsroom rules

Read moreAP doubles down on human oversight in updated AI newsroom rules

When bots become the audience 

Read moreWhen bots become the audience 

The Media Copilot

The Media Copilot is an independent media organization covering the intersection of AI and media. Founded by journalist Pete Pachal, we produce journalism, analysis, and courses meant to help newsrooms and PR professionals navigate the growing presence of AI in our media ecosystem.

  • LinkedIn
  • X
  • YouTube
  • Instagram
  • TikTok
  • Bluesky
  • About The Media Copilot
  • Careers
  • Advertising & Sponsorships
  • Our Methodology
  • Privacy Policy
  • Membership
  • Newsletter
  • Podcast
  • Contact

© 2026 · All Rights Reserved · Powered by Springwire.ai · RSS