Live data from Hacker News

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

twitter.com

641–650 of 1001 posts

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

#641
post #571

Earlier quoted context omitted.

Open Claude Code? Better than OpenCode and Codex

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…

Imagine being Anthropic and opening yourself up to the deluge of CC-coded PRs by all of your users.

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

#642
post #500
post #290

Earlier quoted context omitted.

Paranoia. And also ironic considering their base LLM is a distillation of the web and books etc etc.

It's not really paranoia if it's happening a lot. They wrote a blog post calling several major Chinese AI companies out for distillation.[0] Perhaps it is ironic, but it's within their rights to protect their business, like how they prohibit using Claude Code to make your own Claude Code.[1] [0]: https://www.anthropic.com/news/detecting-and-preventing-dist... [1]: https://news.ycombinator.com/item?id=46578701

And conveniently left out they themselves distilled DeepSeek for chinese content into their model....

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

#643

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…

I don't buy this. Claude doesn't usually have any issues understanding my code. It has tons of issues understanding its code.

The difference between my code and Claude's code is that when my code is getting too complex to fit in my head, I stop and refactor it, since for me understanding the code is a prerequisite for writing code.

Claude, on the other hand, will simply keep generating code well past the point when it has lost comprehension. I have to stop, revert, and tell it to do it again with a new prompt.

If anything, Claude has a greater need for structure than me since the entire task has to fit in the relatively small context window.

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

#644
post #625
post #490

Earlier quoted context omitted.

This is written by an LLM. Also, it doesn't make sense: > 57K lines, 0 tests, vibe coding in production Why on earth would you ship your tests?

"Why would you ship tests?" — Fair point. Source maps only include production bundle files — tests wouldn't appear in the map regardless. Tests may well exist in Anthropic's internal repo, and we can't claim otherwise. However, the bugs we found speak for themselves: a watchdog that doesn't protect the most vulnerable code path for 5+ months, a fallback with telemetry that never executes where it's needed, Promise.ra…

You're not beating the "written by an LLM" allegations.

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

#645

I think this is ultimately caused by a Bun bug which I reported, which means source maps are exposed in production: https://github.com/oven-sh/bun/issues/28001 Claude code uses (and Anthropic owns) Bun, so my guess is they're doing a production build, expecting it not to output source maps, but it is.

It could be because of a Bun bug, but I don't think it's because of that one. It's a duplicate of a year-old issue, and it's specific to Bun.serve.

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

#646
post #438

Earlier quoted context omitted.

Even if it is impossible to win, I am still feeling bad about it. And at this point it is more about how large space will be usable and how much will be bot-controlled wasteland. I prefer spaces important for me to survive.

Feeling bad about something you can’t change is bad for your mental health.

and naming your feelings is the first step toward restoration

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

#647

Really surprising how many people are downplaying this leak! "Google and OpenAi have already open sourced their Agents, so this leak isn't that relevant " What Google and OpenAi have open sourced is their Agents SDK, a toolkit, not the secret sauce of how their flagship agents are wired under the hood! expect the takedown hammer on the tweet, the R2 link, and any public repos soon

I guess that the most important potential "secret sauce" for a coding agent would be its prompts, but that's also one of the easiest things to find out by simply intercepting its messages.

The only real secret sauce is the training methods and datasets used for refining harness usage. Claude Code is a lot better than gemini-cli/open-code/etc because Claude is specifically trained on how to run in that environment. It's been rlhf'd to use the provided tools correctly, and know the framework in which it operates, instead of relying solely on context.

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

#648
post #571

Earlier quoted context omitted.

Open Claude Code? Better than OpenCode and Codex

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…

> 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).

Don't you know, they're proud of their text interface that is structured more like a video game. https://spader.zone/engine/

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

#649

Earlier quoted context omitted.

An LLM company using regexes for sentiment analysis? That's like a truck company using horses to transport parts. Weird choice.

This just proves its vibe coded because LLMs love writing solutions like that. I probably have a hundred examples just like it in my history.

Actually, this could be a case where its useful. Even it only catches half the complaints, that's still a lot of data, far more than ordinary telemetry used to collect.

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

#650
post #571

Earlier quoted context omitted.

Open Claude Code? Better than OpenCode and Codex

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…

I've actually heard a plausible theory about the TUI being janky, that being that they avoid use of the alternate screen feature of ANSI (and onwards) terminals.

The theory states that Anthropic avoids using the alternate screen (which gives consuming applications access to a clear buffer with no shell prompt that they can do what they want with and drop at their leisure) because the alternate screen has no scrollback buffer.

So for example, terminal-based editors -- neovim, emacs, nano -- all use the alternate screen because not fighting for ownership of the screen with the shell is a clear benefit over having scrollback.

The calculus is different when you have an LLM that you have a conversational history with, and while you can't bolt scrollback onto the alternate screen (easily), you can kinda bolt an alternate screen-like behaviour onto a regular terminal screen.

I don't personally use LLMs if I can avoid it, so I don't know how janky this thing is, really, but having had to recently deal with ANSI terminal alternate screen bullshit, I think this explanation's plausible.

Post reply on HN