Live data from Hacker News

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

twitter.com

911–920 of 1001 posts

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

#912

src/cli/print.ts This is the single worst function in the codebase by every metric: - 3,167 lines long (the file itself is 5,594 lines) - 12 levels of nesting at its deepest - ~486 branch points of cyclomatic complexity - 12 parameters + an options object with 16 sub-properties - Defines 21 inner functions and closures - Handles: agent run loop, SIGINT, rate-limits, AWS auth, MCP lifecycle, plugin install/refresh, wo…

> This should be at minimum 8–10 separate modules. Can't really say that for sure. The way humans structure code isn't some ideal best possible state of computer code, it's the ideal organization of computer code for human coders . Nesting and cyclomatic complexity are indicators ("code smells"). They aren't guaranteed to lead to worse outcomes. If you have a function with 12 levels of nesting, but in each nest the f…

Weird and inscrutable can be good: think genetic algorithms [1] such as antenna optimization for EM radiation [2]. But I like my source code on the intelligible side.

[1] https://www.nature.com/articles/s41598-023-35470-4/figures/2

[2] https://jamessealesmith.github.io/img/antenna/ant_struct.png

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

#913
post #898

Earlier quoted context omitted.

You are still responsible for the product; the code has stopped being what defines the product.

If you don't review what the product does, you are irresponsible for the product.

Is the CEO responsible for a company's financial performance? Do they review every line of code the company writes?

It is more irresponsible to spend the time reviewing all of the code rather than spending that time on things with bigger levers for satisfying your customers.

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

#914
post #251

Earlier quoted context omitted.

What's going on with the issues in that repo? https://github.com/instructkr/claude-code/issues

It seems human. It taught me 合影, which seems to be Chinese slang for just wanting to be in the comments. Probably not a coincidence that it's after work time in China. Really interesting to see Github turn into 4chan for a minute, like GH anons rolling for trips.

GitHub had always been about social coding from the beginning (e.g., forking and PRing repos)

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

#915
post #760

Obfuscated ts/js code is not machine code to begin with, so not sure what’s the big deal. Also, not sure why anthropic doesn’t just make their cli open source - it’s not like it’s something special (Claude is, this cli thingy isn’t)

> not sure why anthropic doesn’t just make their cli open source They don't want everyone to see how poorly it's implemented and that the whole thing is a big fragile mess riddled with bugs. That's my experience anyway. For instance, just recently their little CLI -> browser oauth login flow was generating malformed URLs and URLs pointing to a localhost port instead of their real website.

caught that too a few weeks ago, couldn’t log in for a few hours either. I did a double take at the localhost when it loaded up in my browser haha

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

#916

Earlier quoted context omitted.

Random aside: I've seen a 2015 game be accused of AI slop on Steam because it used a similar concept... And mind you, there's probably thousands of games that do this. First it was punctuation and grammar, then linguistic coherence, and now it's tiny bits of whimsy that are falling victim to AI accusations. Good fucking grief

All that is needed to solve that is to reliably put AI disclaimer on things done by AI Which of course won't be done because corporations don't want that (except Valve I guess), so blame them.

And all that's needed for world peace is for everyone to stop fighting.

Which of course won't happen because we live in reality and not fantasy where we can dream that "people should just do X"

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

#917
post #523

This isn't even the first time - something similar happened back in February 2025 too: https://daveschumaker.net/digging-into-the-claude-code-sourc... https://news.ycombinator.com/item?id=43173324

Apparently a yearly ritual

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

#919
post #19

Would be interesting to run this through Malus [1] or literally just Claude Code and get open source Claude Code out of it. I jest, but in a world where these models have been trained on gigatons of open source I don't even see the moral problem. IANAL, don't actually do this. https://malus.sh/

Malus is a homophone of "malice." But then again "Claude" is a homophone of "clod."

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

#920

Earlier quoted context omitted.

To me, this is a sign of just how much regular people do not want AI. This is worse than crypto and metaverse before it. Crypto, people could ignore and the dumb ape pictures helped you figure out who to avoid. Metaverse, some folks even still enjoyed VR and AR without the digital real estate bullshit. And neither got shoved down your throat in everyday, mundane things like writing a paper in Word or trying to deal w…

No there is a very loud minority of users who are very anti AI that hate on anything that is even remotely connected to AI and let everyone know with false claims. See the game Expedition 33 for example.

And E33 is also a good example that these users are a minority and effectively immaterial. They don't affect sales or the popular opinion.

People don't care about AI. They only care whether the product is good.

Post reply on HN