Releases

ClawCode Rewrites Claude Code in Rust, Explodes to 100k GitHub Stars Overnight

A missing .npmignore entry in Claude Code 2.1.88 exposed 512,000 lines of TypeScript; Sigrid Jin's clean-room Rust rewrite hit 100k GitHub stars in under 24 hours.

Sam Ortega3 min read
Published
Listen to this article0:00 min
Share this article:
ClawCode Rewrites Claude Code in Rust, Explodes to 100k GitHub Stars Overnight
AI-generated illustration

The fastest-growing repository in GitHub's recorded history didn't come from a startup announcement or a viral product launch. It came from a missing `.npmignore` entry.

On March 31, 2026, Anthropic shipped Claude Code version 2.1.88 with a JavaScript source map accidentally bundled into the package. Source maps reverse-engineer minified code: they reconstruct original TypeScript identifiers, internal comments, API endpoint paths, and feature flags from production bundles. The result was 512,000 lines of proprietary TypeScript exposed to anyone who downloaded the update. Anthropic later described it as "a release packaging issue caused by human error, not a security breach."

Sigrid Jin, a Korean developer who had attended Claude Code's first birthday party in San Francisco in February and was subsequently profiled by the Wall Street Journal for consuming over 25 billion Claude Code tokens, responded to the leak not by mirroring the code (and collecting an immediate DMCA notice) but by orchestrating a clean-room rewrite. The resulting repository, claw-code, reached 50,000 GitHub stars within two hours of publication and crossed 100,000 within a single day, a rate trackers called unprecedented in the platform's history.

Clean-room, in legal and engineering terms, means something precise. One team documents the system's observable behavior without touching the proprietary source. A separate team writes a new implementation purely from those behavioral specifications. Jin used oh-my-codex as the orchestration layer to coordinate parallel code review and generation. Anthropic's DMCA takedowns targeted repositories hosting the raw leaked TypeScript directly; claw-code's clean-room design positioned it outside that reach, since the project claims no line of original Anthropic code survived into the new codebase.

The architecture reflects a deliberate production-minded split. Rust accounts for roughly 72.9% of the codebase and handles performance-critical paths: the agent runtime, tool execution, session management, and permission context. Python manages the high-level orchestration loop where iteration speed matters more than raw throughput. The canonical implementation lives in the rust/ directory; cargo builds the workspace and produces the claw binary. The project ships 19 permission-gated tools, supports Anthropic, GPT-family, Gemini, and locally-hosted models via Ollama, and carries no telemetry and no guardrails by design.

For Rust developers, the architectural pattern claw-code popularized is worth studying independently of the legal noise surrounding it. Static linking, small deployment artifacts, and Tokio's async runtime make Rust a natural host for the performance-critical substrate of an agent harness. Python retains its role where the agent loop is iterating quickly against an API; Rust owns the plumbing where latency and memory safety matter. The claw-code repo treats the rust/ directory as the source of truth and the Python layer as the scriptable surface above it, a split that maps cleanly onto how production agent systems actually evolve.

The ethical question running under the star count is harder to settle. Racing to reimplement architecture derived from a leaked source document, even without copying source code directly, occupies contested legal territory that no clean-room label fully resolves. Organizations evaluating claw-code for production use should treat it as they would any community artifact of uncertain provenance: full security review, supply chain audit, and scrutiny of every dependency in the tree. The project's own parity_audit.py, a file that explicitly tracks implementation gaps against the original, at least signals the kind of honest accounting that distinguishes serious engineering from opportunistic cloning. Jin's Wall Street Journal profile noted 25 billion tokens consumed; whether claw-code ultimately constitutes contribution or liability may be settled by a lawyer consuming far fewer.

Know something we missed? Have a correction or additional information?

Submit a Tip

Never miss a story.
Get Rust Programming updates weekly.

The top stories delivered to your inbox.

Free forever · Unsubscribe anytime

Discussion

More Rust Programming News