Live data from Hacker News

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

twitter.com

291–300 of 1001 posts

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

#291

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…

How is it that a AI coding agent that is supposedly _so great at coding_ is running on this kind of slop behind the scenes. /s

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

#292
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 dislike LLMs going down that road, i don't want to be punished for being mean to the clanker

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

#295
post #194

Earlier quoted context omitted.

It looks like it's just for logging, why does it need to block?

Better question - why would you call an LLM (expensive in compute terms) for something that a regex can do (cheap in compute terms) Regex is going to be something like 10,000 times quicker than the quickest LLM call, multiply that by billions of prompts

This is assuming the regex is doing a good job. It is not. Also you can embed a very tiny model if you really want to flag as many negatives as possible (I don't know anthropic's goal with this) - it would be quick and free.

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

#298
post #85

Earlier quoted context omitted.

What's special about Claude Code? Isn't Opus the real magic? Surely there's nothing here of value compared to the weights except for UX and orchestration? Couldn't this have just been decompiled anyhow?

I think pi has stolen the top honors, but people consider the Claude code harness very good (at least, better than Cursor)

Pi is the best choice for experts and power users, which is not most people.

Claude Code is still the dominant (I didn't say best) agentic harness by a wide margin I think.

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

#299

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…

here's another gem. src/ink/termio/osc.ts:192–210 void execFileNoThrow('wl-copy', [], opts).then(r => { if (r.code === 0) { linuxCopy = 'wl-copy'; return } void execFileNoThrow('xclip', ...).then(r2 => { if (r2.code === 0) { linuxCopy = 'xclip'; return } void execFileNoThrow('xsel', ...).then(r3 => { linuxCopy = r3.code === 0 ? 'xsel' : null }) }) }) are we doing async or not?

[flagged]
Post reply on HN