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
Watching any? Any favourites? :upside_down_face:
New
AstonJ
Can you spot the AI generated person in the pic below? ▶ Spoiler Video here:
New
AstonJ
Loads of news stories about DeepSeek here in the last few days, no surprise as it’s been making headlines across the world! Currently a h...
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
How are you using AI in my life? How the day to day life is changed around you? professional and in personal life? I it use for autocom...
#ai
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
nix0097
Hello I hope you’re doing well. I’m looking to develop a custom chatbot and would love to collaborate with you on this project. The chat...
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

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
AstonJ
Or looking forward to? :nerd_face:
498 14002 274
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
AstonJ
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting: asdf install erlang 23.1.2 Configure failed. checking ...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
hilfordjames
There appears to have been an update that has changed the terminology for what has previously been known as the Taskbar Overflow - this h...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New