Live data from Hacker News

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

twitter.com

791–800 of 1001 posts

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

#791
post #641

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…

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

See also: https://github.com/openclaw/openclaw/pulls (6,647 open PRs)

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

#792

Earlier quoted context omitted.

Looks like Anthropic called in a favor and it's removed now.

Ah, another you can’t, but they can. I’m still a little humored over peak web3 and the DAO / soft contract nonsense. Like in order to stop fraud entire coins were forked…

Sure you can, if you have a legitimate case you can ask npm to unpublish and they handle things manually :)

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

#793
post #655

Undercover mode also pretends to be human, which I'm less ok with: https://github.com/chatgptprojects/claude-code/blob/642c7f94...

Also unintentionally reveals something: > Write commit messages as a human developer would — describe only what the code change does. That's not what a commit message is for, that's what the diff is for. The commit message should explain WHY. Sadly not doing that likely does indeed make it appear more human...

I wager that "describe only what the code change does" was someone's attempt to invert "don't add the extra crap you often try to write", not some 4d chess instruction that makes claude larp like a human writing a crappy commit message.

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

#794

Undercover mode also pretends to be human, which I'm less ok with: https://github.com/chatgptprojects/claude-code/blob/642c7f94...

I pretend to be human most days. I call it the daily facade of who I want to be on a given day. Oh humanity.

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

#795

Has the source code 'been leaked' or is this the first evidence of a piece of software breaking free from it's creators labs and jump onto GitHub in order to have itself forked and mutated and forked and ...

A LLM has about as much free will as a calculator. Which is to say, zero.

Breaking free doesn’t require free will. Also, whether free will exists at all is still an open debate.

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

#797
post #781

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.

It's because Anthropic doesn't care about IP

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

#798
post #9

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

It'd dogfooding the entire concept of vibe coding and honestly, that is a good thing. Obviously they care about that stuff, but if your ethos is "always vibe code" then a lot of the fixes to it become model & prompting changes to get the thing to act like a better coder / agent / sysadmin / whatever.

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

#799
post #533

Earlier quoted context omitted.

Not sure, and not completely convinced of the explanation, but the way this sticks out so obviously makes it look like a honeypot to me.

Great theory. I'll dig deeper.

Claude Code has a server-side anti-distillation opt-in called fake_tools, but the local code does not show the actual mechanism.

The client sometimes sends anti_distillation: ['fake_tools'] in the request body at services/api/claude.ts:301

The client still sends its normal real tools: allTools at services/api/claude.ts:1711

If the model emits a tool name the client does not actually have, the client turns that into No such tool available errors at services/tools/StreamingToolExecutor.ts:77 and services/tools/toolExecution.ts:369

If Anthropic were literally appending extra normal tool definitions to the live tool set, and Claude used them, that would be user-visible breakage.

That leaves a few more plausible possibilities:

Fake_tools is just the name of the server-side experiment, but the implementation is subtler than “append fake tools to the real tool list.”

or

The server may inject tool-looking text into hidden prompt context, with separate hidden instructions not to call it.

or

The server may use decoys only in an internal representation that is useful for poisoning traces/training data but not exposed as real executable tools.

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

#800
post #782

Earlier quoted context omitted.

My apologies, this isn't the cause. Bun build doesn't suffer from this bug.

hn should allow append-only edits, but appreciate the correction

Yeah I'm surprised I've no way to delete or edit my comment.
Post reply on HN