Live data from Hacker News

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

twitter.com

831–840 of 1001 posts

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

#831
post #38

Neat. Coincidently recently I asked Claude about Claude CLI, if it is possible to patch some annoying things (like not being able to expand Ctrl + O more than once, so never be able to see some lines and in general have more control over the context) and it happily proclaimed it is open source and it can do it ... and started doing something. Then I checked a bit and saw, nope, not open source. And by the wording of…

The trick isn't to patch it once, but to create a system that can reproduce your patches against each release as they come in. Then, when code changes make fixes non-trivial calling in a headless session to heal your fixes.

The first trick will be avoiding getting flagged for running an unofficial build.

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

#832

Earlier quoted context omitted.

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.

> The issue is that you shouldn't be looking for substrings in the first place. Why? They clearly just want to log conversations that are likely to display extreme user frustration with minimal overhead. They could do a full-blown NLP-driven sentiment analysis on every prompt but I reckon it would not be as cost-effective as this.

>Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.

The only time to use a regex is when searching with a human in the loop. All other uses are better handled some other way.

>They could do a full-blown NLP-driven sentiment analysis on every prompt but I reckon it would not be as cost-effective as this.

Every conversation is sent to an llm at least a thousand times the size of gpt2 which could one shot this nearly a decade ago.

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

#833
post #774

Obfuscated ts/js code is not machine code to begin with, so not sure what’s the big deal. Also, not sure why anthropic doesn’t just make their cli open source - it’s not like it’s something special (Claude is, this cli thingy isn’t)

[flagged]

This is wrong, Claude is the worst of the best: codex, pi, opencode, droid/factory, there are many more others can vouch for.

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

#834

Earlier quoted context omitted.

You can’t unpublish a npm package with more than 100 downloads I think.

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

Good luck with that.

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

#835

Earlier quoted context omitted.

> This should be at minimum 8–10 separate modules. Can't really say that for sure. The way humans structure code isn't some ideal best possible state of computer code, it's the ideal organization of computer code for human coders . Nesting and cyclomatic complexity are indicators ("code smells"). They aren't guaranteed to lead to worse outcomes. If you have a function with 12 levels of nesting, but in each nest the f…

> One thing we know for sure is LLMs write code differently than we do. Kind of. One thing we do know for certain is that LLMs degrade in performance with context length. You will undoubtedly get worse results if the LLM has to reason through long functions and high LOC files. You might get to a working state eventually, but only after burning many more tokens than if given the right amount of context. > The worst ou…

> They became popular because teams across the industry analyzed code responsible for bugs/SEVs, and all found high correlation between these metrics and shipping defects.

Yes, based on research of human code. LLMs write code differently. We should question whether the human research applies to LLMs at all. (You wouldn't take your assumptions about chimp research and apply them to parrots without confirming first)

> I think the worst outcome would be throwing out our collective wisdom because the AI labs tell us to.

We don't have to throw it out. But our current use of LLMs are a dramatic change from what came before. We should be questioning our assumptions and traditions that come from a different way of working and intelligence. Humans have a habit of trying to force things to be how they think they should be, rather than allowing them to grow organically, when the latter is often better for a system we don't yet understand.

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

#836
post #655

Earlier quoted context omitted.

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

Yes, this is a trend I've noticed strongly with Claude code—it really struggles to explain why . Especially in PR descriptions, it has a strong bias to just summarize the commits and not explain at all why the PR exists.

The question "why" is always answered with post-hoc rationalizations. This applies to both LLMs and humans.

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

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

George Carlin would be very pleased. They missed quite a few of the heavy seven though.

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

#838

Earlier quoted context omitted.

lol that's funny, I have been working seriously [1] on a feature like this after first writing about it jokingly [2] earlier this year. The joke was the assistant is a cat who is constantly sabotaging you, and you have to take care of it like a gacha pet. The seriousness though is that actually, disembodied intelligences are weird, so giving them a face and a body and emotions is a natural thing, and we already see t…

Is it just me or does MicroMika kinda resemble Rocky from Project Hail Mary?

haha right! I think if I were to make Rocky though, there are a number of more geometric symbols. Maybe like

  ╭⬟╮

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

#839

Earlier quoted context omitted.

lol that's funny, I have been working seriously [1] on a feature like this after first writing about it jokingly [2] earlier this year. The joke was the assistant is a cat who is constantly sabotaging you, and you have to take care of it like a gacha pet. The seriousness though is that actually, disembodied intelligences are weird, so giving them a face and a body and emotions is a natural thing, and we already see t…

You know, that would actually be pretty fun and cool. Like if you had home automation set up with a "pet assistant", but it would only follow your commands if you made sure to keep it happy.

If it could somehow only work if I maintain the kitchen sink and counter, then maybe I'd be motivated to keep the house clean. The gacha game trains you.

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

#840

Whenever someone figures out why it's consuming so many tokens lately, that's the post worth upvoting.

What do you mean? Costs spiked with the introduction of the 1M context window I believe due to larger average cached input tokens, which dominate cost.

Nah, there's apparently a few caching bugs, one --resume and some noisy tool use. I have a little app that monitors and resets the context window at 70% usage based on 200k tokens and I'm about to run out of weekly allowance after just a couple days. Never happened before
Post reply on HN