Claw Code — AI Agent Harness Framework
Overview
Claw Code is an open-source AI agent harness framework built with Python and Rust, designed for engineers who want to deeply understand, extend, and build upon the architectural patterns powering modern AI coding assistants.
Born in a single night on March 31, 2026 — when the Claude Code source was briefly exposed — Claw Code is not a simple archive or mirror. It is a clean-room rewrite: a from-scratch reimplementation of the core harness patterns that make Claude Code work, including tool wiring, task orchestration, command routing, and agent runtime context management. Every line was written independently, guided by architectural study rather than code copying.
The project was built by Sigrid Jin, one of the most active Claude Code power users in the world — a developer featured in the Wall Street Journal for consuming over 25 billion Claude Code tokens in a single year. That level of hands-on experience means Claw Code isn't just theoretically sound — it reflects real-world intuitions about how agent harness systems behave under pressure, at scale, and in production-like conditions.
Within hours of its first public commit, Claw Code became the fastest GitHub repository in history to surpass 30,000 stars, reaching 48K+ stars and 56K+ forks in its first days. It has since attracted a global community of developers, researchers, and AI-curious engineers who want more than a black box — they want to understand, customize, and build.
The core is currently being rewritten in Rust for maximum runtime performance and memory safety, while the Python layer remains active and functional for rapid prototyping and community contribution.
Key Features
1. Clean-Room Agent Harness Architecture Claw Code reimplements the fundamental patterns of an AI agent harness — the connective tissue between a language model and the tools it uses. This includes command dispatch, tool registration, task lifecycle management, and context propagation. Understanding this layer is essential for anyone building serious LLM-powered applications.
2. Python-First, Rust-Accelerated
The primary workspace lives in Python for accessibility and rapid iteration. The src/ tree provides a fully navigable, well-documented implementation with a clean CLI entrypoint. In parallel, a Rust port is actively underway on the dev/rust branch, targeting a faster, memory-safe harness runtime that will become the definitive version of the project.
3. Modular, Inspectable Design Every subsystem is broken into discrete, inspectable modules:
models.py— dataclasses for subsystems, modules, and backlog statecommands.py— command port metadatatools.py— tool port metadataquery_engine.py— porting summary rendererport_manifest.py— workspace structure manifestmain.py— unified CLI entrypoint
Use Cases
LLM Agent Infrastructure Research If you're studying how large language models interact with external tools — how commands are routed, how context is maintained across turns, how tool results are fed back into the model — Claw Code gives you a readable, well-structured codebase to learn from. It's the closest open-source approximation of a production-grade AI coding assistant harness.
Building Custom AI Coding Assistants Developers looking to build their own Claude Code-style tools — custom coding agents, autonomous task runners, or multi-tool LLM pipelines — can use Claw Code as a foundation. The modular Python architecture is designed to be forked, adapted, and extended.






