Live data from Hacker News

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

twitter.com

931–940 of 1001 posts

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

#931
post #553

Earlier quoted context omitted.

I don't understand how you can have a 'clean-room port.' Seems contradictory to me.

That's not the actual plan. "I have a popular repo, but the content will likely be removed and I won't have personally gained from the saga: how can I fix the part where I didn't profit?" "Eureka! I'll remove the content preemptively, then come up with a backstory that justifies reusing the now empty repo for building the umpteenth coding harness! And I can even claim fuzzy ties to Claude Code!" Hence the new descrip…

> The result is a clean-room Python rewrite that captures the architectural patterns of Claude Code's agent harness without copying any proprietary source.

This is what I'm referring to.

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

#932

There's a bunch of unreleased features and update schedules in the source, cool to see. One neat one is the /buddy feature, an easter egg planned for release tomorrow for April fools. It's a little virtual pet, sort of like Tamagotchi, randomly generated with 18 species, rarities, stats, hats, custom eyes. The random generation algorithm is all in the code though, deterministic based on you account's UUID in your cla…

Update: it looks like the live version of the algorithm is slightly different, probably changed because of these leaks. As such the app predictions aren't accurate, sorry

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

#933
You know, I knew that frustration was detected because, well, duh, you can drop a single "shit" even somewhere where it isn't critical of the agent's work, and it becomes apologetic, lol.

But I always thought that using the word "Clanker" was going to be one of the triggers. Turns out no. I guess Claudad is not up to the lingo.

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

#934

Earlier quoted context omitted.

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?

what does that even do?

Looks like it tries wl-copy, then tries xclip and then tries xsel. I have no idea what those are but google says it's for Wayland, so, I think it's a linux function trying to copy to clipboard? I think their problem is with the use of '.then(...=>...)' since there doesn't seem to be a way to tell each function that the nested ones actually finished.

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

#935

Earlier quoted context omitted.

So, think of it as a business man: You don't really care if your customers swear or whatever, but you know that it'll generate bad headlines. So you gotta do something. Just like a door lock isn't designed for a master criminal, you don't need to design your filter for some master swearer; no, you design it good enough that it gives the impression that further tries are futile. So yeah, you do what's less intesive to…

Yea.. but.. in English only. Fortunately I can swear pretty well in Spanish.

Only a native speaker can tell if you swear well in a foreign language.

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

#936

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.

> This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

Close.

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

#937

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…

the claude code team ethos, as far as i’ve been lead to understand— which i agree with, mind you— is that there is no point in code-reviewing ai-generated code… simply update your spec(s) and regenerate. it is just a completely different way of interacting with the world. but it clearly works for them, so people throwing up their hands should at least take notice of the fact that they are absolutely not competing wit…

> it may be sucky aesthetically

It's not a matter of being pretty, but of being robust and maintainable.

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

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

Maybe. Could just be a pre filter.

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

#939

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

Yeah, I thought Anthropic was for AI safety. Telling Ai to not be honest is a bad sign.

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

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

[dead]
Post reply on HN