Inside Claude Code’s Leaked Source: What 512,000 Lines Tell Us About Building AI Agents

Towards AI
Generative AI

TL;DR On March 31, 2026, Anthropic accidentally published a 59.8 MB JavaScript source map file in v2.1.88 of their -ai/claude-code npm package, exposing the entire ~512,000-line TypeScript codebase. The root cause was a missing *.map exclusion in their publish configuration the bundler generates source maps by default, and no publish-time gate caught it before it went live. The leaked code reveals a product significantly ambitious than its public surface: always-on background agents, 30-minute remote planning sessions, a Tamagotchi companion, and a multi-agent swarm orchestration system.