Live data from Hacker News

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

twitter.com

891–900 of 1001 posts

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

#891
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.

Browse through codex and think if anyone cares about the quality of the code before Open sourcing it.

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

#892
post #264

too much pressure. the author deleted the real source code: https://github.com/instructkr/claude-code/commit/7c3c5f7eb96...

there are a .....lot of forks already, no putting the genie back in the bottle for this one, I'd imagine.

Forks are easy for Github to shut down simultaneously. What you really want is to upload the code as a new repo (ideally a different name from the original one). But it shouldn't be too hard in practice to detect uploading the same codebase as one that's taken down if that's desired.

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

#893

Earlier quoted context omitted.

I wish. Claude Code is clearly a pile of vibe-coded garbage. The UI is janky and jumps all over the place, especially during longer sessions. (Which also have a several second delay to render. In a terminal). Lately, it's been crashing if I hold the Backspace key down for too long. Being open-source would be the best thing to happen to them. At least they would finally get a pair of human eyes looking at their codeba…

As a point of reference, I’m a heavy cc user and I’ve had a few bugs but I’ve never had the terminal glitches like this. I use iterm on macOS sequoia.

To be fair, iTerm is likely to be the single most common terminal emulator used by Claude Code developers, so I'd hope that it would work tolerable well there.

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

#894

Earlier quoted context omitted.

I always type "please continue". I guess being polite is not a good idea.

Always seems strange to me that people say "please" and "thank you" to LLMs.

It seems strange to you? It's natural to how I write - intentionally avoiding politeness would be weirder to me.

But aside from that, an LLM is only a roleplayer. Treat it like an idiot that makes mistakes and it will act like one. Treat it like a coworker who you respect and it will act like one, and it will find better results.

Obviously nothing about how they act is set in stone but as a general rule this seems to me to be both wise and, in my experience, true as well.

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

#895

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…

This answer blew my mind. It's making me think in a very different way.

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

#897

Earlier quoted context omitted.

It's how people resisted CGI back in the day. What people dislike is low quality. There is a loud subset who are really against it on principle like we also have people who insist on analog music but regular people are much more practical but they don't post about this all day on the internet.

Not really. The scale is entirely different. I think less of someone as a person if they send me AI slop.

  > I think less of someone as a person if they send me AI slop.
n=1 but working on side projects for others, i could easily generate ai images (instead of using stock photos) for a client, but i resist because i also feel this but as the sender...

there is the fact that such images 'look ai' but even if it were perfect, idk somehow i feel cheap doing that.

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

#898
post #584

Earlier quoted context omitted.

>there is no point in code-reviewing ai-generated code the idea that you should just blindly trust code you are responsible for without bothering to review it is ludicrous.

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.

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

#899

Earlier quoted context omitted.

First time I hear about this, it's interesting to have written all of this out. Now this makes me think of game decompilation projects, which would seem to fall in the same legal area as code that would be generated by something like Malus. Different code, same end result (binary or api). We definitely need to know what the legal limits are and should be

i think most game decompilation projects are either openly illegal or operate on "provide your own binary" and build automatic tooling around it

Yes, because we have clear precedent that distributing Art (the assets) is illegal by current copyright law.

But do we have precedent (in any country) that distributing different source code that compiles to the exact same binary is illegal ?

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

#900

Earlier quoted context omitted.

> You'll never win this battle, so why waste feelings and energy on it? Cool. The attitude of a bully. Thanks for the contribution!

That's an ironic comment.

Hardly. They're clearly trying to influence a group at large using a flawed logical tactic. I'm pointing that out with a device that suggests their same futility they expect others to adapt should be primarily experienced by them instead.

If pointing out bullies is bullying then you're in a ridiculous mindset.

Post reply on HN