Wink Pings

After Claude Code Source Code Leak, Community Dissects the Architecture

Anthropic accidentally leaked the TypeScript source code for Claude Code. Instead of hunting for the original code, the community's immediate reaction was to analyze its architecture—how the memory system works, how the tool use logic is implemented. Someone went further, using AI to rewrite the entire thing in Python overnight. Copyright law in the AI era might truly need a rethink.

The most interesting aspect of the Claude Code source leak isn't the DMCA back-and-forth.

It's the community's first reaction after the leak: dissecting the architecture for analysis—the memory system, tool use logic, context management. Everyone was speculating about these things, just without source code proof. Now they have it, and even for just a few hours, it was enough for a group to digest it thoroughly.

Then came an even bolder move.

Someone created a repository on GitHub called claude-code (now renamed claw-code), completely rewriting the whole system from scratch in Python. They didn't use Claude for this; they used Codex. One night, over 1,000 lines of code, and the core architecture was essentially ported over.

Why do this?

Copyright doesn't protect 'derivative works'—that's the legal term. But does rewriting TypeScript into Python count as a derivative work? The law doesn't say. Copyright law wasn't designed with this kind of play in mind.

Anthropic faces an awkward situation:

If they insist on copyright protection, acknowledging that 'rewriting in another language counts as infringement,' they'd essentially be digging a hole for the entire AI industry—any AI lab using large models to generate code in the future could be sued. All those copilots, cursors, and even Claude Code itself would be at risk.

If they don't pursue it, it seems unfair. Having your leaked code republished in another language would make anyone uncomfortable.

Gergely Orosz made a point: the likely outcome is to pretend it never happened. For an AI company, pushing copyright law in a stricter direction isn't in its own interest.

Another angle worth considering: the speed of the rewrite.

One night, one AI, and one developer can largely replicate someone else's closed-source core system. This isn't an isolated case; it's a replicable operation. Today it's Claude Code; tomorrow it could be anything.

So, should copyright law catch up? And if so, how? That's a more pressing question than this specific leak.

Currently, this Python version repository has already garnered over 50,000 stars on GitHub, and a Rust version is on the way.


![GitHub Repository Screenshot](https://wink.run/image?url=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHEvurLRbQAAkzQJ%3Fformat%3Djpg%26name%3Dlarge)

Information Sources: [@yucheng](https://x.com/yucheng/status/2039111253751484436) / [@GergelyOrosz](https://x.com/GergelyOrosz/status/2038985760175505491) / [GitHub repo](https://github.com/instructkr/claw-code)

发布时间: 2026-04-01 13:38