• 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
    • AI for PR & Communications Professionals
    • AI for Journalists
    • Custom AI Training for Teams
  • Newsletter
  • Podcast
  • Events
    • GEO Dinner Series
    • Webinars
  • About

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 The Copilot

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

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/

Key Takeaways

  • Packaging error pushed Claude Code’s full 512K-line source to NPM.
  • A Solayer Labs developer spotted it; mirrored 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:anthropic| ai| Microsoft| claude code
Share this post:
FacebookTweetLinkedInEmail
  • Related articles

Spyware and AI surveillance targeting journalist on the rise, IFJ warns

Read moreSpyware and AI surveillance targeting journalist on the rise, IFJ warns

NSA Using Anthropic’s Mythos Despite Pentagon Blacklist, Reports Say

Read moreNSA Using Anthropic’s Mythos Despite Pentagon Blacklist, Reports Say

UK and US financial regulators hold emergency meetings over Anthropic’s Claude Mythos

Read moreUK and US financial regulators hold emergency meetings over Anthropic’s Claude Mythos

AP offers buyouts as AI and tech companies now drive revenue growth

Read moreAP offers buyouts as AI and tech companies now drive revenue growth

Tubi brings streaming recommendations into ChatGPT, the first major streamer to do so

Read moreTubi brings streaming recommendations into ChatGPT, the first major streamer to do so
An AI robot agent sliding an Agent Name Service badge into a Cloudflare toll booth, with the open web visible beyond the gate

Cloudflare and GoDaddy want to set the rules for the AI agent web

Read moreCloudflare and GoDaddy want to set the rules for the AI agent web

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
  • Advertising & Sponsorships
  • Our Methodology
  • Privacy Policy
  • Membership
  • Newsletter
  • Podcast
  • Contact

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