xiji2646-netizen

xiji2646-netizen

Claude Code's entire source just leaked (512K lines) - anyone else digging through it?

Woke up to this today: Claude Code’s complete source code exposed via npm source map. Not a snippet. All 512,000 lines. 1,900 TypeScript files.

How it happened

Single .map file in production npm package → R2 bucket URL → complete source download.

Classic supply chain security fail.

What’s exposed

  • QueryEngine.ts (46K lines): entire LLM API engine
  • Tool.ts (29K lines): all agent tools
  • commands.ts (25K lines): slash commands
  • ~40 tools, ~85 commands
  • Feature flags: PROACTIVE, VOICE_MODE, BRIDGE_MODE, KAIROS
  • Easter egg: BUDDY digital pet system (hidden, April launch planned)

Anthropic’s response

Removed source map, deleted old npm versions. Too late — 3+ GitHub mirrors already exist.

The ironic part

This is Anthropic’s second leak in 5 days. March 26: CMS error exposed unreleased “Claude Mythos” model + 3K assets.

Community: “The irony is unreal” — Anthropic markets Claude’s code review capabilities, then leaks own code via config error.

Nuanced take

Developer Skanda: “This ‘leak’ is clickbait. Claude Code CLI has always been readable in npm package (minified JS). Source map just makes it readable TypeScript.”

He’s right. Anthropic never treated CLI logic as secret. Core moat = Claude model, not CLI tool.

But: seeing code ≠ understanding code. Source map lowered barrier significantly.

What you can learn

Developer Jingle Bell analyzed the codebase, found 4 production patterns:

  1. System prompt engineering: Tool constraints, risk controls, output specs make AI predictable
  2. Multi-agent orchestration: Coordinator mode, permission mailbox, atomic claims, team memory
  3. Three-layer context compression: MicroCompact (local), AutoCompact (near limit), Full Compact (nuclear option)
  4. AutoDream memory consolidation: Background process, 4-phase flow (Orient → Gather → Consolidate → Prune)

For developers, this is a free masterclass in production AI architecture.

Discussion questions

  • Is this actually a “leak” if the minified code was already public?
  • Does exposing CLI architecture hurt Anthropic’s competitive position?
  • What’s the biggest lesson here — supply chain security or AI architecture patterns?

Links:

Anyone else spending their weekend reading through this?

First Post!

dyowee

dyowee

reading source code != understanding source code

:slight_smile:

Where Next?

Popular Ai topics Top

AstonJ
This video about multi-agent AI is a really nice watch - it only took them a few million tries to master certain strategies - doing much ...
#ai
New
AstonJ
I have a feeling we’re going to see a lot of threads about DeepSeek, so have put up a portal for it :003:
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New
AstonJ
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
apoorv-2204
I’m reaching out to all software engineers, especially senior developers — I really want to hear your thoughts. I’ve always loved buildi...
New
apoorv-2204
General thoughts on google gemini ? IMHO , when compared chatgpt and claude sonnnet its pretty shit, and its feels broken,
#ai
New
kammy
Hi everyone! The other day I was having a debate with my friends about whether or not the top LLM models are “good at design.” I’d love ...
New
AstonJ
Tucker: You’ve had complaints from one programmer who said you steal people’s stuff without paying them and he winded up being murdered.
New
Eiji
Yesterday a very interesting to discuss situation have happen. While StackOverflow still suffer a lot, because of chat bots, but yesterda...
New
xiji2646-netizen
Woke up to this today: Claude Code’s complete source code exposed via npm source map. Not a snippet. All 512,000 lines. 1,900 TypeScript ...
New

Other popular topics Top

DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
PragmaticBookshelf
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
New
PragmaticBookshelf
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New
xiji2646-netizen
Woke up to this today: Claude Code’s complete source code exposed via npm source map. Not a snippet. All 512,000 lines. 1,900 TypeScript ...
New