# Claw Code > A clean-room Python and Rust rewrite of the Claude Code agent harness, created after Anthropic accidentally leaked 512,000 lines of Claude Code source via an npm. Claw Code is an open-source clean-room rewrite of the Claude Code agent harness, created in direct response to Anthropic's accidental leak of the full Claude Code source code on March 31, 2026. The leak occurred when a 59.8 MB source map file was shipped inside version 2.1.88 of the `@anthropic-ai/claude-code` npm package, exposing 512,000 lines of unobfuscated TypeScript across 1,900 files. Korean developer Sigrid Jin (instructkr), previously profiled by the Wall Street Journal as one of Claude Code's most prolific power users, initially mirrored the source — then rewrote the entire codebase from scratch in Python at 4 AM to avoid legal exposure from Anthropic's DMCA campaign. The repo hit 50,000 stars in two hours, making it the fastest-growing repository in GitHub history, and has since crossed 100,000 stars. The project captures the architectural patterns of Claude Code's agent harness, tool wiring, and runtime context management without copying proprietary source. It is actively developed with AI-assisted workflows using oh-my-codex (OmX) and oh-my-opencode (OmO) for scaffolding, orchestration, and verification. - **Rust Port** — *A systems-language port under `rust/` featuring crates for API client, runtime, tools, commands, plugins, compatibility harness, and an interactive CLI binary (`claw-cli`).* - **Python Workspace** — *A `src/` tree providing port manifest, models, commands, tools, query engine, and a CLI entrypoint for manifest and summary output.* - **MCP Orchestration** — *Session state, compaction, MCP orchestration, and prompt construction are handled in the `crates/runtime` crate.* - **Plugin System** — *A plugin model with hook pipeline and bundled plugins via `crates/plugins`.* - **Slash Commands & Skills** — *Slash commands, skills discovery, and config inspection via `crates/commands`.* - **API Client** — *Provider abstraction, OAuth, and streaming support in `crates/api-client`.* - **LSP Integration** — *LSP client integration crate for editor compatibility.* - **Interactive REPL** — *Markdown rendering and project bootstrap/init flows in `crates/claw-cli`.* - **AI-Assisted Development** — *Built using `$team` mode for parallel code review and `$ralph` mode for persistent execution loops with architect-level verification via OmX.* - **Verification Suite** — *Python test suite and parity audit tooling to validate the port against the original harness structure.* ## Features - Clean-room Python and Rust rewrite of Claude Code agent harness - Rust crates for API client, runtime, tools, commands, plugins - Interactive REPL with markdown rendering - MCP orchestration and session state management - Plugin model with hook pipeline - Slash commands and skills discovery - LSP client integration - OAuth and streaming API support - Python porting workspace with CLI entrypoint - Parity audit tooling - AI-assisted development with oh-my-codex and oh-my-opencode ## Integrations oh-my-codex (OmX), oh-my-opencode (OmO), OpenAI Codex, MCP (Model Context Protocol) ## Platforms CLI, API, DEVELOPER_SDK ## Pricing Open Source ## Links - Website: https://github.com/instructkr/claw-code - Documentation: https://github.com/instructkr/claw-code#readme - Repository: https://github.com/instructkr/claw-code - EveryDev.ai: https://www.everydev.ai/tools/claw-code