TL;DR
Claw Code is an open-source AI coding agent framework — a clean-room rewrite of Claude Code’s architectural patterns in Python and Rust. It landed with 72,000 GitHub stars in its first days, becoming one of the fastest-growing AI tooling repos ever. Key facts:
- 72,000+ GitHub stars, 72,600+ forks in days
- Clean-room rewrite — no proprietary code copied, no third-party model weights used
- Python + Rust — Python for flexibility, Rust port in progress for performance
- Focuses on the harness layer — how context, tools, and decisions flow through AI coding agents
- Built using AI tools — rewritten with oh-my-codex running on OpenAI Codex
- Independent — not affiliated with Anthropic or any model provider
- License: Open source
The timing couldn’t be better. Days after Claude Code’s source got leaked via npm sourcemaps and Anthropic cut third-party tool subscriptions, Claw Code offers developers a fully open alternative.
Why This Matters
Claude Code made autonomous AI coding agents mainstream. But it’s a closed system — you use it, you don’t study it, you can’t extend it in fundamental ways. The “harness” — how prompts get built, tools get called, context flows — is a black box.
Claw Code opens that black box. As the creator (instructkr) puts it:
“The model is only part of the story. The harness — how context flows, how tools connect, how decisions get made — is where the real engineering lives. That layer should be open.”
This matters now more than ever:
- Claude Code’s source leaked (March 31) via an npm sourcemap mistake — developers got a glimpse of the architecture
- Anthropic cut subscriptions (April 4) for third-party tools — costs are going up
- The harness layer is where innovation happens — multi-agent systems, tool chains, context management
What’s in the Box
The Claw Code repository currently includes:
src/Python workspace — Active core implementationtests/directory — Validation suite ensuring behavioral parity- CLI utilities — Summaries, manifests, subsystem inspection, parity audits
- Rust port (in progress) — Targeting memory-safe, faster production runtime
The project is explicitly a clean-room rewrite — no code copied from Claude Code’s leaked sources, no proprietary model weights used. It’s original engineering work that reconstructs architectural patterns from scratch.
How It Works
The Harness Layer
An AI coding agent harness is everything around the LLM:
User Prompt → Harness → [Plan] → [Tool Call] → [Observe] → [Update Context] → [Loop]
↑ ↓
Tools Memory
Claw Code focuses on making each stage transparent and extensible:
- Task decomposition — How a high-level goal becomes subtasks
- Tool invocation — How the agent picks and calls tools (file edit, shell, web search)
- Context management — What goes into each LLM call, how memory is maintained
- Observability — Logging, tracing, and correcting agent behavior
Why Python + Rust
- Python core — Rapid iteration, easy to read and modify, broad ecosystem
- Rust port — Memory safety, performance for production workloads
- Parity audits — Tests ensure Python and Rust implementations match
This two-language approach mirrors what modern AI infrastructure looks like (think: PyTorch + C++ kernels, LangChain Python + serverless runtimes).
Getting Started
Installation
# Clone the repo
git clone https://github.com/instructkr/claw-code
cd claw-code
# Install Python dependencies
pip install -e .
# Or use uv (faster)
uv pip install -e .
Basic Usage
from claw_code import Agent, Tools
# Create an agent with default tools (file ops, shell, etc)
agent = Agent(model="gpt-5.4", tools=Tools.default())
# Run a task
result = agent.run("Refactor src/auth.py to use async/await throughout")
# Inspect the trace
for step in result.trace:
print(f"[{step.type}] {step.description}")
Running with Local Models
# Use Ollama with a local model
agent = Agent(
model="qwen3.5:35b-a3b-coding-nvfp4",
base_url="http://localhost:11434/v1",
tools=Tools.default()
)
Works with Ollama 0.19’s MLX-accelerated local models — fully offline coding agent.
What Makes It Different
vs Claude Code
| Feature | Claw Code | Claude Code |
|---|---|---|
| License | Open source | Proprietary |
| Models | Any (BYOK) | Claude only |
| Inspectable | ✅ Full source | ❌ Closed |
| Cost | Free + API | Subscription/API |
| Languages | Python + Rust | TypeScript |
| Extensibility | Fork & modify | Plugin API only |
vs oh-my-claudecode
- oh-my-claudecode is a Claude Code plugin — extends but requires Claude Code
- Claw Code is a standalone harness — works with any LLM, no Claude Code needed
vs Aider / OpenCode / Codex CLI
- Aider is git-focused with a mature UI; Claw Code is more of a framework you build on
- OpenCode is an earlier open-source harness attempt
- Codex CLI is OpenAI’s official tool — closed source
Community Reactions
The speed of adoption is the story. 72,000 stars in days is extraordinarily fast. For context:
- LangChain took months to reach 72K stars
- Claude Code is closed source (no stars to count)
- Most viral AI tools peak at 5-10K stars in their first week
The HN discussion highlighted:
- Excitement about finally having an open harness reference implementation
- Skepticism about whether star counts reflect real usage
- Discussion about how “clean-room” it really is given the Claude Code leak happened the same week
- Interest in the Rust port for production use
Limitations
- Early stage — The first structured release milestone is still being finalized
- Python-only today — Rust runtime is “in progress”
- Documentation gaps — Evolving rapidly; some APIs not yet documented
- Smaller tool library — Default tool set is limited vs Claude Code’s full suite
- Star count skepticism — 72K stars in days invites questions about authenticity (though forks match)
Who Should Use This
- Researchers studying agent architectures — Best open reference implementation available
- Teams building proprietary AI coding tools — Fork it, customize, own the stack
- Developers tired of closed harnesses — Full transparency into what the agent does
- Local-first AI users — Works with Ollama, local models, no vendor lock-in
- Contributors wanting impact — Active, fast-growing project
Who Should Skip This
- Users who just want to code — Claude Code, Cursor, or Windsurf are more polished
- Production teams needing stability — Too early; pin dependencies carefully
- Non-Python developers — Wait for the Rust runtime to mature
The Bigger Picture
Claw Code’s arrival isn’t a coincidence. The AI coding world is bifurcating:
- Closed, premium tools — Claude Code, Cursor, Windsurf (Cognition)
- Open, composable frameworks — Claw Code, OpenCode, Aider
The closed tools win on polish and ease of use. The open frameworks win on transparency, cost, and customization. Most serious developers will use both — closed for daily work, open for building custom solutions.
Claw Code fills a real gap: a reference implementation of a Claude-Code-class harness that anyone can read, fork, and extend.
FAQ
Q: Is Claw Code affiliated with Anthropic? A: No. It’s an independent open-source project with no endorsement from Anthropic or any model provider.
Q: Did it use the leaked Claude Code source? A: The project states explicitly it’s a “clean-room rewrite without copying proprietary source code.” The Claude Code leak happened around the same time, but Claw Code development predates the leak per the repository history.
Q: What models does it support? A: Any OpenAI-compatible API. That includes GPT-5.4, Claude (via API), Gemini, Ollama local models, DeepSeek, etc.
Q: When is the stable release? A: The first structured release milestone targets a stable Python API, expanded documentation, and initial Rust runtime modules. No specific date yet.
Q: Can I contribute? A: Yes. The project welcomes contributors in systems programming, AI tooling, and developer experience. See claw-code.codes for contribution guidelines.
Last verified: April 5, 2026