The Claude Code Source Leak: 512,000 Lines, a Missing .npmignore, and the Fastest-Growing Repo in GitHub History

6 months ago by cm0002 to c/programming

Anthropic accidentally shipped a 59.8 MB source map in its npm package, exposing 512,000 lines of Claude Code's TypeScript source. The community responded with clean-room rewrites, architectural deep dives, and the fastest repo to 50K stars in GitHub history.
hodgepodgin 98 points 6 months ago

The clean-room approach created a novel legal puzzle. Gergely Orosz (The Pragmatic Engineer) observed that Anthropic faces a dilemma: a Python rewrite constitutes a new creative work potentially outside DMCA reach. If Anthropic claims the AI-generated transformative rewrite infringes copyright, it could undermine their own defense in training-data copyright cases - the same argument that AI-generated outputs from copyrighted inputs constitute fair use.

The only moral justification for an AI rewrite. Love it.

path: 0 22980216, hotness: undefined, score: 98, children: 1
talkingpumpkin 17 points 6 months ago

My guess they are not even gonna challenge the "clean room" rewrite legally: the damage is done and it's not really gonna be mitigated if they manage to take down the rewrite.

path: 0 22980216 22982342, hotness: undefined, score: 17, children: 0
TheFrirish 35 points 6 months ago

path: 0 22980299, hotness: undefined, score: 35, children: 0
talkingpumpkin 31 points 6 months ago

Anthropic pulled the npm package within hours and issued a statement: the exposure was "a release packaging issue caused by human error, not a security breach."

I'm sure they chose the words "human error" to also imply the error is not to blame on their LLM, which remains an open question after reading the article (and likely will forever, although at the very least it would seem like the LLM did not detect this mistake).

path: 0 22982327, hotness: undefined, score: 31, children: 1
disorderly 10 points 6 months ago

Yeah, I had a good laugh at this. Half of the commits I review are coauthored by Claude, a fact that I'm sure Anthropic is thrilled to claim, but this colossal fuck up was obviously the work of a rogue intern or something.

path: 0 22982327 22984050, hotness: undefined, score: 10, children: 0
seadoo 17 points 6 months ago path: 0 22984807, hotness: undefined, score: 17, children: 2
AstroLightz 5 points 6 months ago

So is "Claw Code" supposed to mean Claude? I don't see any explanation of what the repo actually is.

path: 0 22984807 22989817, hotness: undefined, score: 5, children: 1
seadoo 5 points 6 months ago

As far as I can tell, claw code is the python reproduction of Claude code that the leaker/discoverer wrote up to avoid getting sued or at least taken off github for hosting their leaked code. I haven’t looked at the repo much so it might be very incomplete, but maybe it works!

path: 0 22984807 22989817 22990864, hotness: undefined, score: 5, children: 0
programming
programming

@programming.dev

login for more options
28819
3722
3326

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...