logoalt Hacker News

Claude Code's source code has been leaked via a map file in their NPM registry

1769 pointsby treexstoday at 9:00 AM868 commentsview on HN

https://xcancel.com/Fried_rice/status/2038894956459290963

Related ongoing thread: The Claude Code Source Leak: fake tools, frustration regexes, undercover mode - https://news.ycombinator.com/item?id=47586778


Comments

tills13today at 3:02 PM

Is it not already a node app? So the only novel thing here is we know the original var names and structure? Sure, sometimes obfuscated code can be difficult to intuit, but any enterprising party could eventually do it -- especially with the help of an LLM.

solaire_oatoday at 3:50 PM

I couldn't tell from the title whether is was client or the server code (although map file and NPM were hints). Looks like the client code, which is not as exciting.

LeoDaVibecitoday at 9:11 AM

Isn't it open source?

Or is there an open source front-end and a closed backend?

show 5 replies
nickvectoday at 4:19 PM

And this is what happens when you don’t take security seriously folks and instead just rush out vibecoded features without proper QA.

oxag3ntoday at 6:18 PM

Many comments about code quality being irrelevant.

I'd agree if it was launch-and-forget scenario.

But this code has to be maintained and expanded with new features. Things like lack of comments, dead code, meaningless variable names will result in more slop in future releases, more tokens to process this mess every time (like paying tech-debt results in better outcomes in emerging projects).

Sathwickptoday at 11:39 AM

They do have a couple of interesting features that has not been publicly heard of yet:

Like KAIROS which seems to be like an inbuilt ai assistant and Ultraplan which seems to enable remote planning workflows, where a separate environment explores a problem, generates a plan, and then pauses for user approval before execution.

mutkachtoday at 1:29 PM

/*

* Check if 1M context is disabled via environment variable.

* Used by C4E admins to disable 1M context for HIPAA compliance.

*/ export function is1mContextDisabled(): boolean {

  return 
isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)

}

Interesting, how is that relevant to HIPAA compliance?

show 2 replies
mapcarstoday at 9:09 AM

Are there any interesting/uniq features present in it that are not in the alternatives? My understanding is that its just a client for the powerful llm

show 3 replies
evanbabaallostoday at 5:57 PM

Releasing a massive feature every day has a cost!

unreliability becomes inevitable!

DanDeBuggertoday at 3:42 PM

Fascinating, it appears now anyone can be Claude!

Though I wonder how the performance differs from creating your own thing vs using their servers...

freakynittoday at 7:00 PM

tools/bashSecurity.ts is a hackers goldmine. Sooo many exploit patterns detailed in there!!

VadimPRtoday at 12:11 PM

Anthropic team does an excellent job of speeding up Claude Code when it slows down, but for the sake of RAM and system resources, it would be nice to see it rewritten in a more performant framework!

And now, with Claude on a Ralph loop, you can.

show 1 reply
therealarthurtoday at 2:37 PM

Think It's just the CLI Code right? Not the Model's underlying source. If so - not the WORST situation (still embarrassing)

ramesh31today at 2:17 PM

Who cares? It's Javascript, if anyone were even remotely motivated deobfuscation of their "closed source" code is trivial. It's silly that they aren't just doing this open source in the first place.

randomsctoday at 7:07 PM

Did it happen due to Bun?

sourcegrifttoday at 1:46 PM

Cheap chinese models incoming.

show 1 reply
theanonymousonetoday at 10:02 AM

I am waiting now for someone to make it work with a Copilot Pro subscription.

show 1 reply
sbochinstoday at 11:57 AM

Does this matter? I think every other agent cli is open source. I don’t even know why Anthropic insist upon having theirs be closed source.

anhldbktoday at 10:04 AM

I guess it's time for Anthropic to open source Claude Code.

show 1 reply
prawns_1205today at 3:11 PM

source maps leaking original source happens surprisingly often. they're incredibly useful during development, but it's easy to forget to strip them from production builds.

tekacstoday at 11:24 AM

In the app, it now reads:

> current: 2.1.88 · latest: 2.1.87

Which makes me think they pulled it - although it still shows up as 2.1.88 on npmjs for now (cached?).

show 1 reply
__alexstoday at 1:56 PM

Looking forward to someone patching it so that it works with non Anthropic models.

show 2 replies
jedisct1today at 10:53 AM

It shows that a company you and your organization are trusting with your data, and allowing full control over your devices 24/7, is failing to properly secure its own software.

It's a wake up call.

show 2 replies
lanbintoday at 4:18 PM

I read it with a different flavor. Is it possible that Mythos did all of this? I mean, life has always been finding a way, hasn't it? The first cry of cyber-life?

dev213today at 12:45 PM

Undercover mode is pretty interesting and potentially problematic: https://github.com/sanbuphy/claude-code-source-code/blob/mai...

neilvtoday at 7:11 PM

I've never understood this convention (common on HN, some news orgs, and elsewhere), that, when there's an IP breach, it's suddenly fair game for everyone else to go through the IP, analyze and comment on it publicly, etc.

show 1 reply
Uptrendatoday at 7:20 PM

That idea list is super cute. I like the tamagochi idea. Somehow the candidness of that file makes it seem like anthropic would be an easy place to work at.

ZainRiztoday at 2:38 PM

Maybe now someone will finally fix the bug that causes claude code to randomly scroll up all the way to the top!

boxerbktoday at 2:06 PM

Maybe everyone should slow the fuck down - https://mariozechner.at/posts/2026-03-25-thoughts-on-slowing...

q3ktoday at 9:19 AM

The code looks, at a glance, as bad as you expect.

show 6 replies
artdigitaltoday at 12:40 PM

Now waiting for someone to point Codex at it and rebuild a new Claude Code in Golang to see if it would perform better

dark-startoday at 6:42 PM

The more I think about this, the more it seems they're not talking about linker map files[1]....

[1] https://www.tasking.com/documentation/smartcode/ctc/referenc...

ChicagoDavetoday at 10:11 AM

I hope everyone provides excellent feedback so they improve Claude Code.

napotoday at 12:44 PM

The autoDream feature looks interesting.

xysttoday at 6:03 PM

Bad day for the node/npm ecosystem.

zoobabtoday at 12:14 PM

Just a client side written in JS, nothing to see here, the LLM is still secret.

They could have written that in curl+bash that would not have changed much.

thefilmoretoday at 11:49 AM

400k lines of code per scc

DeathArrowtoday at 10:12 AM

Why is Claude Code, a desktop tool, written in JS? Is the future of all software JS or Typescript?

show 7 replies
sourcegrifttoday at 1:59 PM

Removed

bdangubictoday at 12:05 PM

I have 705 PRs ready to go :)

agile-gift0262today at 12:55 PM

time to remove its copyright through malus.sh and release that source under MIT

show 1 reply
isodevtoday at 10:15 AM

Can we stop referring to source maps as leaks? It was packaged in a way that wasn’t even obfuscated. Same as websites - it’s not a “leak” that you can read or inspect the source code.

show 3 replies
temp7000today at 12:51 PM

There's some rollout flags - via GrowthBook, Tengu, Statsig - though I'm not sure if it's A/B or not

DeathArrowtoday at 10:05 AM

I wonder what will happen with the poor guy who forgot to delete the code...

show 4 replies
tw1984today at 2:06 PM

wondering whether it was a human mistake or a CLAUDE model error.

show 1 reply
hemantkamalakartoday at 12:39 PM

today being March 31st, is this a genuine issue or just perfectly timed April Fools noise? What do you think?

🔗 View 29 more comments