Why Claw Code’s Claude Code Clone Is Gaining Massive Traction
Claw Code, an open‑source Python‑and‑Rust reimplementation of Anthropic’s Claude Code agent, exploded to over 100 k stars within hours after a leaked .map file revealed 510 k lines of the original TypeScript, and the article dissects its creator, architecture, features, and legal gray area.
On March 31, 2026 Anthropic unintentionally packaged a .map file into their Claude Code npm package, exposing 1,906 source files and roughly 512,000 lines of TypeScript that constitute the internal architecture of their flagship AI programming agent.
Within a few hours developer Sigrid Jin recreated the entire core architecture in Python, launching the open‑source project Claw Code . The project claims to follow the same design patterns without copying any proprietary code, making it legally independent and vendor‑agnostic, able to work with Claude, OpenAI, or local models.
What Is Claw Code?
Claw Code is an open‑source AI programming agent framework that is a “clean‑room rewrite” of Claude Code, built from scratch using Python and Rust. Key points:
No proprietary code copied : the architecture differs and is legally independent.
Vendor‑agnostic : can be paired with Claude, OpenAI, or self‑hosted models.
Fully auditable and extensible .
Free and self‑hostable .
Creator
The project was created by developer Sigrid Jin , who has been featured in the Wall Street Journal (March 21, 2026), consumed 25 billion Claude Code tokens in a year, attended Claude Code’s one‑year anniversary in San Francisco, and is one of the most active Claude Code super‑users.
Build Method
Jin used oh‑my‑codex (OmX) , a workflow layer built on OpenAI Codex. The build is driven by two modes: $team mode – parallel code review and architectural feedback. $ralph mode – persistent execution loop with verification.
Collaboration with OmX creator Yeachan Heo ( @bellman_ych) further advanced the project.
Current Status
Python core is complete and runnable.
Rust migration branch ( dev/rust) is active, now 89.6 % Rust.
Provides 27 CLI sub‑commands for inspection, listing, and verification.
Cannot yet fully replace Claude Code’s runtime.
Architecture is viewable, but full agent execution is still in development.
Rust version expected to merge soon, becoming a fully functional runtime.
Architecture and Core Components
The codebase is modular, with roughly 72.9 % Rust (high‑performance runtime) and 27.1 % Python (agent orchestration and LLM integration).
Tool System
19 built‑in, permission‑controlled tools covering file I/O, bash execution, Git operations, web scraping, and agent spawning.
Each tool runs in a sandbox with configurable access control.
Query Engine
Handles all LLM API calls.
Manages streaming responses and caching.
Supports multi‑step orchestration.
Vendor‑agnostic design (not locked to Claude).
Multi‑Agent Orchestration
Derives sub‑agents called “swarms”.
Parallel processing of complex tasks.
Each sub‑agent runs in an isolated context with shared memory access.
MCP Integration
Implements a full Model Context Protocol.
Supports six transport types: Stdio, SSE, HTTP, WebSocket, SDK, ClaudeAiProxy.
OAuth‑based connection to external tool servers.
Session and Memory
Multi‑layer memory system with session persistence and conversation compression.
Uses CLAUDE.md for context discovery.
Seven‑Stage Startup Sequence
Prefetch – collect workspace metadata and configuration.
Warning processor – install error handlers.
CLI parser + trust gate – parse arguments and verify permissions.
Setup + parallel loading – run workspace settings, load commands/agents.
Delayed initialization – execute delayed steps after trust gate passes.
Mode routing – route to runtime modes (standard, remote, SSH, teleport, direct, deep link).
Query engine submission loop – enter main dialogue loop handling tool calls.
This mirrors Claude Code’s internal logic but is now documented and open.
Comparison with Claude Code
Claw Code offers transparency (readable source), multi‑vendor support, customizability, self‑hosting, and a community‑driven development model. Claude Code retains production‑ready runtime, official Anthropic support, IDE integrations, and upcoming features such as KAIROS, ULTRAPLAN, and autoDream.
Legal and Ethical Considerations
Because Claw Code is a clean‑room implementation that does not copy any proprietary code, it can evade DMCA takedown requests, though the gray‑area status is acknowledged. Gergely Orosz of The Pragmatic Engineer notes that Anthropic cannot issue DMCA takedowns against projects that rewrite the code in different languages from scratch.
Anthropic cannot issue DMCA takedowns against projects that rewrite its code from scratch in different languages.
For researchers interested in how agent frameworks operate or who wish to build their own tools atop a transparent system, Claw Code serves as a solid starting point.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Algorithm Path
A public account focused on deep learning, computer vision, and autonomous driving perception algorithms, covering visual CV, neural networks, pattern recognition, related hardware and software configurations, and open-source projects.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
