Claude Code source code just leaked because of a simple mistake
A source code leak tied to Anthropic’s Claude Code is quickly getting attention after a .map file exposed internal source files through an npm package
Share this article
What You Need To Know
What was found:
- Full internal
src/directory exposed via.mapfile - ~1,900 files and 500k+ lines of code
- Multi-agent system with tools, memory, plugins, commands
- Voice, remote sessions, and server capabilities
- List of unreleased features
What users managed to find out already:
- Large portions appear AI-generated
- Evidence suggests Claude helps build Claude Code
- Hidden features hint at future expansions
A source code leak tied to Anthropic’s Claude Code is quickly getting attention after a .map file exposed internal source files through an npm package.
The leak was quickly archived on GitHub and shared publicly, reportedly containing ~1,900 files and over 500,000 lines of code.
How The Leak Surfaced
The story didn’t break through press — it surfaced where most AI leaks do now: forums.
The thread quickly gained traction in r/singularity, with users digging into the structure and sharing findings in real time.
What The Code Actually Reveals
This isn’t just a CLI wrapper. The leaked structure shows Claude Code is built like a full agent platform.
Key Components
- Multi-agent orchestration system
- ~40 internal tools
- ~50 slash commands
- Plugin & “skills” system
- Memory directory (persistent context)
- Voice + remote session support
- Server mode for external integrations

Fun Findings Hidden In The Code
- Telemetry for swearing: Anthropic tracks when users swear at Claude to measure user frustration.
- “Capybara” Model: Code comments reveal an unreleased model codenamed “Capybara” (with a
capybara-fastvariant). - Auto Mode: A
TRANSCRIPT_CLASSIFIERthat auto-approves tool permissions without prompting the user.
AI Helped Build It
Developers reviewing the code noted patterns consistent with AI-generated output.
User on Reddit reported: “A lot of this code looks AI-generated… naming and repetition patterns give it away.”
User on X said: “It genuinely looks like Claude wrote a big part of Claude Code.”
This aligns with trends seen in tools like Cursor, where AI contributes directly to production-level code.
Tech Stack (Confirmed)
| Layer | Stack |
|---|---|
| Runtime | Bun |
| UI | React + Ink (CLI rendering) |
| Language | TypeScript |
| Architecture | Modular / tool-based agents |
This aligns with what we’ve seen across newer AI dev tools — less “chatbot,” more composable execution engine.
Unreleased Features
Some components suggest features not yet publicly released.
Notable Features
- KAIROS — Persistent Assistant: An always-on mode where Claude remembers everything across sessions. It keeps daily logs of what you talked about and “dreams” overnight — automatically organizing your memories into useful notes while you sleep.
- BUDDY — AI Companion Pet: Every user gets a unique virtual pet that appears next to their terminal prompt. Your pet’s species, rarity, and personality are generated from your account ID — so yours is one-of-a-kind.
- ULTRAPLAN — Cloud Planning: For complex tasks, Claude spins up a separate cloud instance that explores and plans for up to 30 minutes. You review and approve the plan in your browser before it runs.
and more as the twitter user reports.
Why It Matters
The exposure offers insight into how leading AI coding tools are structured internally.
- Competitors can analyze architecture and tooling
- Researchers can study agent orchestration patterns
- Security researchers gain visibility into potential weaknesses
The leak follows earlier reports of vulnerabilities in Claude Code that were later addressed.
Conclusion
The source code leak appears to stem from a configuration oversight rather than a targeted breach.
Still, it reveals how quickly AI development tools are evolving—from assistants into full execution systems—and how much of that evolution is now happening in public view.