The Anthropic Leak

Claude Code Source Disclosure

Technical Deep Dive into the March 2026 Incident

What Actually Happened?

  • Trending claim: "Anthropic leaked their entire source code"
  • The Reality: Specifically the full source code of Claude Code (Agentic CLI)
  • Status: Confirmed human error, not a security breach

The Data: What was exposed?

  • ~512,000 lines of TypeScript source
  • ~1,900 files in total
  • 43 built-in tools & 44 feature flags
  • 26 hidden slash commands
  • Over 120 secret environment variables

The "Oops": How it happened

  • Packaging Mistake: Accidentally bundled a .map file in the npm package
  • R2 Linkage: The map file pointed to a ZIP archive on Anthropic's Cloudflare R2 bucket
  • Accessibility: The archive was public and unencrypted

The Bun & .npmignore Factor

  • Runtime: Anthropic uses the Bun runtime
  • Default Behavior: Bun generates source maps by default
  • Human Error: Forgot to add *.map to the .npmignore file
  • Result: Shipped unobfuscated source alongside the production build

Why It's Permanent

  • Viral Forking: Over 41,500 forks on GitHub immediately
  • Mirrors: Hosted across decentralized repositories (IPFS/Torrents)
  • DMCA Ineffective: The "Streisand Effect" in full force

A Rough Week for Anthropic

  • Second Major Mishap: Occurred within days of another leak
  • Model Leak: Unreleased model details (codenamed "Mythos" / "Capybara") left in a public repo
  • Security Posture: Highlights systemic packaging/CI issues rather than infrastructure breaches

Key Takeaways

  • Not a hack; a packaging pipeline failure
  • Claude Code internals are now public knowledge
  • No customer credentials or model weights were exposed
  • A lesson in strict .npmignore and CI/CD validation