Big news dropped today.
A security researcher discovered that Anthropic accidentally shipped a source map file in their npm package — exposing the entire Claude Code source code.
We're talking 512,000+ lines of TypeScript, 1,900 files, and a ton of unreleased features that weren't supposed to be public.
Github repo in comments below.
Massive rush to fork/clone it :)
Some interesting insights-
How the leak happened
Anthropic uses Bun as their bundler, which generates source maps by default. Someone forgot to exclude the .map file from the npm publish. That map file pointed to an R2 storage bucket with the full unobfuscated source. Ironically, Claude Code has an internal system called "Undercover Mode" specifically designed to prevent leaking internal codenames... and then they shipped the entire codebase in a .map file.
The tool system is massive — and MCP-relevant
Claude Code runs ~40 permission-gated tools internally. Every tool is a self-contained module with its own input schema, permission model, and execution logic.
The architecture is essentially the same pattern as MCP servers — discrete, composable capabilities that an LLM can invoke.
If you're building MCP servers, Claude Code's internal tool design is basically a masterclass in how to structure agent-facing tools.
Key details:
The base tool definition alone is 29,000 lines of TypeScript
The query engine (handles all LLM API calls, streaming, caching) is 46,000 lines
There's a full plugin system and a skill system — suggesting Anthropic is building toward extensibility beyond just MCP
IDE bridge system for VS Code and JetBrains provides bidirectional communication with the CLI
Unreleased features that hint at the future
These are gated behind compile-time feature flags (stripped from public builds):
KAIROS Mode — A persistent, always-running Claude assistant that doesn't wait for you to type. It watches your workflow, logs observations, and proactively acts on things it notices. It maintains append-only daily log files and has a 15-second blocking budget (any action that would slow you down gets deferred). It gets tools that regular Claude Code doesn't have.
ULTRAPLAN — Offloads complex planning tasks to a remote Cloud Container Runtime running Opus 4.6, gives it up to 30 minutes to think, then lets you approve the result from your browser. There's a special sentinel value that "teleports" the approved plan back to your local terminal.
DAEMON Mode — Background agent that keeps working while you're away.
Buddy System — A full Tamagotchi-style companion pet with deterministic gacha, species rarity, shiny variants, and a soul description written by Claude on first hatch. The code references April 1–7, 2026 as a teaser window with full launch gated for May 2026. Each buddy has its own personality and can respond when addressed by name.
Voice Mode — Already rolling out to ~5% of users. Push-to-talk with /voice command.
Multi-agent orchestration — A full coordinator system for spawning and managing sub-agents.
MONITOR_TOOL & AGENT_TRIGGERS — Suggests event-driven agent behaviors are coming.
What this could means for MCP builders potentially-
The tool pattern is validated — Anthropic's own internal architecture mirrors what the MCP community has been building. Discrete, permission-gated, schema-defined tools are the future.
Proactive agents are coming — KAIROS isn't just a chatbot that waits for input. It's an always-on agent. MCP servers that can emit events (not just respond to requests) will be critical infrastructure.
Multi-agent is real — The coordinator system means Claude Code can spawn sub-agents for parallel work. MCP servers that work well in multi-agent contexts will have a huge advantage.
Plugin + Skill systems — Beyond MCP, Anthropic is building extensibility layers. Worth watching how these interact with the MCP protocol.
The leaked repo already has 15,000+ stars and 21,900+ forks on GitHub.
This is probably the most significant look inside a production AI coding tool we've ever gotten.