Live data from Hacker News

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

twitter.com

441–450 of 1001 posts

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

#441
A couple of years ago I had to evaluate A/B test and feature flag providers, and even then when they were a young company fresh out of YC, GrowthBook stood out. Bayesian methods, bring your own storage, and self-hosting instead of "Contact us for pricing" made them the go-to choice. I'm glad they're doing well.

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

#442
post #349
post #84

They have an interesting regex for detecting negative sentiment in users prompt which is then logged (explicit content): https://github.com/chatgptprojects/claude-code/blob/642c7f94... I guess these words are to be avoided...

I'm clearly way too polite to Claude. Also: // Match "continue" only if it's the entire prompt if (lowerInput === 'continue') { return true } When it runs into an error, I sometimes tell it "Continue", but sometimes I give it some extra information. Or I put a period behind it. That clearly doesn't give the same behaviour.

“Go on” works fine too

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

#443
post #148
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 not a real project btw, it's a parody: “Let's end open source together with this one simple trick” https://pretalx.fosdem.org/fosdem-2026/talk/SUVS7G/feedback/ Malus is translating code into text, and from text back into code. It gives the illusion of clean room implementation that some companies abuse. The irony is that ChatGPT/Claude answers are all actually directly derived from open-source code, so...

It's not a parody when they accept money and deliver the service.

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

#444
post #290
post #69

ANTI_DISTILLATION_CC This is Anthropic's anti-distillation defence baked into Claude Code. When enabled, it injects anti_distillation: ['fake_tools'] into every API request, which causes the server to silently slip decoy tool definitions into the model's system prompt. The goal: if someone is scraping Claude Code's API traffic to train a competing model, the poisoned training data makes that distillation attempt less…

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

I would say not all that ironic. Book publishers, Reddit, Stackoverflow, etc., tried their best to attract customers while not letting others steal their work. Now Anthropic is doing the same.

Unfortunately (for the publishers, at least) it didn't work to stop Anthropic and Anthropic's attempts to prevent others will not work either; there has been much distillation already.

The problem of letting humans read your work but not bots is just impossible to solve perfectly. The more you restrict bots, the more you end up restricting humans, and those humans will go use a competitor when they become pissed off.

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

#445
post #84

They have an interesting regex for detecting negative sentiment in users prompt which is then logged (explicit content): https://github.com/chatgptprojects/claude-code/blob/642c7f94... I guess these words are to be avoided...

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

The difference in response time - especially versus a regex running locally - is really difficult to express to someone who hasn't made much use of LLM calls in their natural language projects.

Someone said 10,000x slower, but that's off - in my experience - by about four orders of magnitude. And that's average, it gets much worse.

Now personally I would have maybe made a call through a "traditional" ML widget (scikit, numpy, spaCy, fastText, sentence-transformer, etc) but - for me anyway - that whole entire stack is Python. Transpiling all that to TS might be a maintenance burden I don't particularly feel like taking on. And on client facing code I'm not really sure it's even possible.

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

#446
post #290
post #69

ANTI_DISTILLATION_CC This is Anthropic's anti-distillation defence baked into Claude Code. When enabled, it injects anti_distillation: ['fake_tools'] into every API request, which causes the server to silently slip decoy tool definitions into the model's system prompt. The goal: if someone is scraping Claude Code's API traffic to train a competing model, the poisoned training data makes that distillation attempt less…

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

It is absolutely not paranoia. People are distilling Claude code all the time.

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

#447

Earlier quoted context omitted.

>Everyone is commenting how this regex is actually a master optimization move by Anthropic No? I'd say not even 50% of the comments are positive right now.

Could you share the regex you used to come up with that sentiment analysis?

(yes|no|maybe)

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

#448
post #84

They have an interesting regex for detecting negative sentiment in users prompt which is then logged (explicit content): https://github.com/chatgptprojects/claude-code/blob/642c7f94... I guess these words are to be avoided...

They also have a "keep going" keyword, literally just "continue" or "keep going", just for logging.

I've been using "resume" this whole time

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

#449

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

Funny thought, but this is just the client-side CLI...

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

#450
post #84

They have an interesting regex for detecting negative sentiment in users prompt which is then logged (explicit content): https://github.com/chatgptprojects/claude-code/blob/642c7f94... I guess these words are to be avoided...

They also have a "keep going" keyword, literally just "continue" or "keep going", just for logging. I've been using "resume" this whole time

Continue?
Post reply on HN