Live data from Hacker News

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

twitter.com

461–470 of 1001 posts

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

#461

Anthropic team does an excellent job of speeding up Claude Code when it slows down, but for the sake of RAM and system resources, it would be nice to see it rewritten in a more performant framework! And now, with Claude on a Ralph loop, you can.

This. If I run 4 Claude code opus agents with subagents, my 8gb of RAM just dies.

I know they can do better

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

#462

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…

"You can get Claude to split that up"

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

#463
post #346

Earlier quoted context omitted.

Magical human verification technology is called "your own private forum" in conjunction with "invite your friends"

Until your friend writes a bot. Funny story, when I was younger I trained a basic text predictor deep learning model on all my conversations in a group chat I was in, it was surprisingly good at sounding like me and sometimes I'd use it to generate some text to submit to the chat.

I used to leave a megahal connected to my bouncer when I wasn't around

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

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

We used this in 2011 at the startup I worked for. 20 positive and 20 negative words was good enough to sell Twitter "sentiment analysis" to companies like Apple, Bentley, etc...

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

#466
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…

Haven’t looked at the code, but is the server providing the client with a system prompt that it can use, which would contain fake tool definitions when this is enabled? What enables it? And why is the client still functional when it’s giving the server back a system prompt with fake tool definitions? Is the LLM trained to ignore those definitions?

Wonder if they’re also poisoning Sonnet or Opus directly generating simulated agentic conversations.

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

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

[deleted]

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

#468

Earlier quoted context omitted.

They're searching for multiple substrings in a single pass, regexes are the optimal solution for that.

The issue isn't that regex are a solution to find a substring. The issue is that you shouldn't be looking for substrings in the first place. This has buttbuttin energy. Welcome to the 80s I guess.

Clbuttic!

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

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

OMG WTF

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

#470

These security failures from Anthropic lately reveal the caveats of only using AI to write code - the safety an experienced engineer is not matched by an LLM just yet, even if the LLM can seemingly write code that is just as good. Or in short, if you give LLMs to the masses, they will produce code faster, but the quality overall will degrade. Microsoft, Amazon found out this quickly. Anthropic's QA process is better…

Anthropic has a QA process? I run into bugs on the regular, even on the "stable" release channel
Post reply on HN