Live data from Hacker News

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

twitter.com

341–350 of 1001 posts

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

#342

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…

I'm sure this is no surprise to anyone who has used CC for a while. This is the source of so many bugs. I would say "open bugs" but Anthropic auto-closes bugs that don't have movement on them in like 60 days.

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

#344

Earlier quoted context omitted.

Yes, if it was made for human comprehension or maintenance. If it's entirely generated / consumed / edited by an LLM, arguably the most important metric is... test coverage, and that's it ?

LLMs are so so far away from being able to independently work on a large codebase, and why would they not benefit from modularity and clarity too?

I agree the functions in a file should probably be reasonably-sized.

It's also interesting to note that due to the way round-tripping tool-calls work, splitting code up into multiple files is counter-productive. You're better off with a single large file.

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

#345
post #314

Earlier quoted context omitted.

That isn't irony, it's hypocrisy.

That’s capitalism

As opposed to the rent-seeking copyright industry where 1% goes to the original creators if you're lucky.

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

#346
post #134

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

You'll never win this battle, so why waste feelings and energy on it? That's where the internet is headed. There's no magical human verification technology coming to save us.

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

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

#347

Earlier quoted context omitted.

This is the dumbest take there is about vibe coding. Claiming that managing complexity in a codebase doesn't matter anymore. I can't imagine that a competent engineer would come to the conclusion that managing complexity doesn't matter anymore. There is actually some evidence that coding agents struggle the same way humans do as the complexity of the system increases [0]. [0] https://arxiv.org/abs/2603.24755

Well what is Anthropic doing differently to deal with this issue? Apparently they don't write any of their own code anymore, and they're doing fine.

Cc is buggy as hell man. I frequently search the github for the issue I’m having only to find 10 exact bugs that no one is looking at.

Obviously they don’t care. Adoption is exploding. Boris brags about making 30 commits a day to the codebase.

Only will be an issue down the line when the codebase has such high entropy it takes months to add new features (maybe already there).

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

#348
post #249
post #7

The big loss for Anthropic here is how it reveals their product roadmap via feature flags. A big one is their unreleased "assistant mode" with code name kairos. Just point your agent at this codebase and ask it to find things and you'll find a whole treasure trove of info. Edit: some other interesting unreleased/hidden features - The Buddy System: Tamagotchi-style companion creature system with ASCII art sprites - Un…

If this true. My old personal agent Claude Code setup I open sourced last month will finally be obsolete (1 month lol): https://clappie.ai - Telegram Integration => CC Dispatch - Crons => CC Tasks - Animated ASCII Dog => CC Buddy

Not necessarily; I would very much like to use those features on a Linux server. Currently the Anthropic implementation forces a desktop (or worse, a laptop) to be turned on instead of working headless as far as I understand it.

I’ll give clappie a go, love the theme for the landing page!

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

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

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

#350

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…

it's the `runHeadlessStreaming` function btw
Post reply on HN