logo
  • Środowiska
  • Dla firm
  • Cennik
Blogs
Branża|Apr 1, 2026

Claw Code vs Claude Code: What an Open-Source GitHub Clone Reveals About AI Agent Architecture

A technical teardown of Claw Code on GitHub — a Rust-and-Python reverse-engineered take on Claude Code — and how close it gets to the real thing.

Douglas LaiDouglas Lai
Share to
Claw Code vs Claude Code: What an Open-Source GitHub Clone Reveals About AI Agent Architecture
  • What Is Claw Code?
  • What Is Claude Code?
  • Claw Code vs Claude Code: At a Glance
  • What Claw Code Gets Right
  • Significant gaps: what is missing
  • Implementation quality
  • Feature parity scorecard
  • What this teaches us about AI agent architecture
  • Verdict
  • Who should dig into Claw Code on GitHub?
  • Who should stay on Claude Code?
  • Why consider Eigent as a broader open-source option
  • FAQ
  • Key takeaways
Automate Everything with
AI Workforce on Desktop
Download Eigent

If you have searched for claw code github or wondered whether Claude Code open source exists in any meaningful form, Claw Code is the project people mean. It is an open-source, reverse-engineered reimplementation of Anthropic’s Claude Code — rebuilt in Rust (runtime) and Python (metadata and porting scaffold) — and it offers a rare look inside how a production-style AI coding agent is structured.

This guide follows our usual Comparison format: what each side is, how they stack up in practice, where Claw Code lands technically, and a clear verdict for builders evaluating the codebase.

What Is Claw Code?

Claw Code is an open-source project that attempts to replicate the core functionality of Claude Code — Anthropic’s agentic coding tool for the terminal and IDE. The source lives on GitHub under an open license; it is not affiliated with Anthropic.

The project is split into two layers:

  • A Python metadata layer that serves primarily as a porting scaffold — tracking progress, managing session persistence, and housing dataclass-based schemas.
  • A Rust CLI runtime that implements the actual agentic conversation loop, tool execution, API streaming, and permission management.

At roughly 1,500 lines of Python and 4,000 lines of Rust, Claw Code is an early-stage prototype. But it correctly identifies several architectural patterns that make AI coding agents work.

What Is Claude Code?

Claude Code is Anthropic’s proprietary terminal- and IDE-native AI coding assistant. It is not open source: the product is closed, distributed by Anthropic, and runs against Claude models with features such as MCP (Model Context Protocol), subagents, hooks, skills, and deep IDE integration.

When people ask for Claude Code open source, they are usually looking for either (a) an independent reimplementation like Claw Code on GitHub, or (b) a different product altogether (for example, a multi-agent desktop coworker). Claw Code is firmly in the first camp — an educational and experimental mirror of part of Claude Code’s behavior, not an official release.

Claw Code vs Claude Code: At a Glance

DimensionClaw Code (GitHub)Claude Code (Anthropic)
License / codeOpen source; inspect and fork on GitHubProprietary; closed codebase
Runtime stackRust CLI + Python scaffoldTypeScript / Node (internal)
ModelAnthropic API (you bring keys)Claude models via Anthropic
MCP extensibilityNot implementedCore to real-world workflows
Subagents / parallel tasksNot implementedMajor product capability
IDE integrationNoneCLI + VS Code / JetBrains, etc.
MaturityPrototype (~20–25% feature surface)Production assistant

The comparison is asymmetric by design: Claw Code is a learning artifact and partial reimplementation; Claude Code is a shipping product with full platform investment.

What Claw Code Gets Right

The agentic conversation loop

The most important thing Claw Code nails is the fundamental agentic loop — the core engine of any AI coding assistant:

User message → API call → Parse response → Execute tools → Feed results back → Repeat

The Rust implementation (ConversationRuntime<C, T>) models this loop with trait-based abstractions over ApiClient and ToolExecutor. That separation mirrors production agents: model calls and tool execution stay decoupled, testable, and swappable.

SSE streaming and API integration

The API client is arguably Claw Code’s most production-ready piece. It implements:

  • Anthropic’s Messages API v1 with Server-Sent Events (SSE) streaming
  • Incremental frame parsing with buffering
  • Retry logic with exponential backoff for 408, 429, and 5xx responses
  • Cache token tracking for cache_creation_input_tokens and cache_read_input_tokens
  • Authentication via ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN

For anyone building a custom Anthropic client, this crate is a credible reference.

File operation tools

Claw Code ships six core tools — Bash, Read, Write, Edit, Glob, and Grep — with behavior aligned to Claude Code’s model:

  • Edit uses exact string matching rather than regex, matching Claude Code’s behavior and avoiding a class of escaping bugs.
  • Glob sorts results by modification time (newest first).
  • Grep supports context lines, multiple output modes, and pagination.
  • Write auto-creates parent directories.

The permission model

The three-tier permission system (Allow, Deny, Prompt) with per-tool overrides via a PermissionPolicy struct reflects how Claude Code gates tool execution. Any agent that runs shell commands and edits files needs this layer — Claw Code’s framing is directionally sound.

Session compaction

When context grows toward token limits, agents must compress older turns while keeping recent messages useful. Claw Code’s compaction — summarizing earlier messages into the system prompt while retaining the last N turns — captures how that works in practice.

Significant gaps: what is missing

While Claw Code captures the skeleton of an AI coding agent, several systems that separate prototypes from production tools are absent.

No MCP (Model Context Protocol) support

This is the largest gap. MCP is the extensibility backbone of Claude Code: external MCP servers supply tools, resources, and prompts the agent discovers at runtime. Claw Code has no MCP client, transport, dynamic discovery, or resource integration — the tool set stays fixed at build time.

No subagent orchestration

Claude Code can spawn nested agent conversations and parallel work (with isolation and aggregation). Claw Code does not implement nested conversations, worktree isolation, child context boundaries, or result merging.

No hook or skill systems

Production Claude Code exposes user-configurable hooks and a skill / slash-command pipeline. Claw Code’s handler is minimal (for example, /compact only), with no hook or skill discovery pipeline.

Incomplete system prompt construction

The prompt builder has the right coarse sections but omits dynamic pieces such as CLAUDE.md discovery, git status snapshots, MCP server instructions, and runtime metadata (date, model name, etc.).

No IDE integration

The bridge and server architecture used for VS Code and JetBrains extensions is absent.

Implementation quality

Rust layer — solid foundation (7/10)

The Rust code uses #![forbid(unsafe_code)], trait-based structure, and an SSE parser that handles multi-line frames and pings. Rough edges include a custom JSON parser for session files instead of serde_json, overlapping CLI entry points, hardcoded defaults, and naive token estimation (string length / 4).

Python layer — mostly scaffolding (3/10)

The Python layer is clean for dataclasses and parity audits, but much of it is placeholder stubs, simulated tools, and empty remote/SSH paths. Runtime value today sits in the Rust layer.

Feature parity scorecard

Implemented

  • Core agentic conversation loop
  • Six MVP tools (bash, read, write, edit, glob, grep)
  • API streaming client with SSE
  • Session persistence and compaction

Partially implemented

  • Permission enforcement (framework without full interactive prompting)
  • System prompt construction (structure without full dynamic injection)
  • Config file merging (user / project / local)

Not implemented

  • MCP client and transport
  • Subagent / Agent tool spawning
  • IDE bridge via LSP or extensions
  • Skill system, hooks, web search tools
  • Smarter context budgeting and cost tooling
  • Notebook and PDF reading tools

What this teaches us about AI agent architecture

Beyond the Claw Code vs Claude Code line-by-line contrast, the GitHub project is a useful artifact for builders:

  • The loop is the easy part. “Call model → parse tools → execute → feed back” is straightforward. Power comes from MCP, subagents, hooks, skills, and IDE bridges.
  • Streaming matters. Blocking until full completion feels broken for CLI agents; Claw Code’s SSE work is the most reusable component.
  • Permissions are table stakes for shell and file tools.
  • Context is still hard. Naive compaction works until it doesn’t; production systems need selective retention and budget discipline.

Verdict

Claw Code captures roughly 20–25% of Claude Code’s functional surface. The Rust layer — API client, loop, file tools — is the valuable core. The Python layer mainly documents porting intent.

As a study of claw code github and what an unofficial Claude Code open source-style mirror can show, it succeeds. As a drop-in replacement for Claude Code, it would need large additional work in MCP, orchestration, and integration layers.

Who should dig into Claw Code on GitHub?

Choose Claw Code when you want to:

  • Read a concrete open-source implementation of Anthropic-style tool loops and SSE clients
  • Teach or research AI coding agent architecture without relying on closed code
  • Fork a Rust-first base and invest in MCP yourself

Who should stay on Claude Code?

Stay with Anthropic’s Claude Code when you need MCP, subagents, IDE extensions, hooks, skills, and a supported product path — not a research prototype.

Why consider Eigent as a broader open-source option

If your goal is open-source automation beyond a single-terminal coding agent, Eigent is a multi-agent open-source coworker with desktop workflows, skills, and multiple model providers — complementary to reading Claw Code for low-level agent mechanics.

FAQ

What is Claw Code on GitHub?

Claw Code is an open-source project that reverse-engineers parts of Claude Code using a Rust CLI and Python metadata layer. The repository is github.com/instructkr/claw-code.

Is Claude Code open source?

No. Claude Code is proprietary. Claw Code is an independent open-source project inspired by Claude Code’s behavior; it is not an Anthropic release.

Is Claw Code a full replacement for Claude Code?

Not today. Critical gaps include MCP, subagent orchestration, IDE integration, and the full tool and prompt pipeline.

What languages is Claw Code written in?

Primarily Rust for the runtime (~4k lines) and Python for scaffolding (~1.5k lines). Claude Code itself is a closed TypeScript/Node product.

Why does missing MCP matter?

MCP is how Claude Code extends tools dynamically. Without it, Claw Code’s tool surface stays fixed, which limits real-world workflows.

Key takeaways

  • Claw Code GitHub = open, educational partial clone; Claude Code = proprietary, full product.
  • Core loop, streaming client, file tools, and permissions in Claw Code are instructive; MCP, subagents, and IDE layers are not there yet.
  • Searching claude code open source should lead you to projects like Claw Code — useful references, not feature-complete substitutes.

Recent Posts

Best Legal AI Agents in 2026: Top Platforms Compared (+ a Free Alternative)
BranżaJun 19, 2026

Best Legal AI Agents in 2026: Top Platforms Compared (+ a Free Alternative)

The best legal AI agents in 2026 compared: Harvey, CoCounsel, Lexis+ Protégé, Kira, and Spellbook — plus Eigent, the free, open-source legal AI you can self-host.

Douglas LaiDouglas Lai
CoCounsel Alternative (Free & Open Source): Why Teams Choose Eigent
BranżaJun 19, 2026

CoCounsel Alternative (Free & Open Source): Why Teams Choose Eigent

Looking for a free CoCounsel alternative? Compare CoCounsel Legal with Eigent, the open-source legal AI platform you can self-host, plus a full contract workflow.

Douglas LaiDouglas Lai
Eudia Alternative (Free & Open Source): Why Teams Choose Eigent
BranżaJun 19, 2026

Eudia Alternative (Free & Open Source): Why Teams Choose Eigent

Looking for a free Eudia alternative? Compare Eudia's augmented intelligence platform with Eigent, the open-source legal AI you can self-host, plus a full workflow.

Douglas LaiDouglas Lai
Automate everything with AI workforce on desktop
Download Eigent

Wypróbuj Eigent już dziś

Pobierz open-source’ową aplikację desktopową. Twoja SI workforce, działająca na Twoim komputerze.

Pobierz Eigent
Eigent

Otrzymuj najnowsze aktualizacje, poradniki i wydania dotyczące automatyzacji SI workforce.

ProduktEigentŚrodowiskaCennikDla firm
OdkrywajRozwiązaniaPrzypadki użyciaUmiejętnościWtyczkiBlogi
DeweloperzyDokumentacjaGitHubCAMEL-AIFundusz Open SourcePartner
PobierzDla open source
FirmaO nasBrandKarieraWarunki korzystaniaPolityka prywatnościBezpieczeństwo i zaufaniePolityka plików cookiePolityka zwrotów i wersji próbnej

Wszelkie prawa zastrzeżone © 2026 EIGENT UK LTD

Wydano nową wersję Eigent 1.0!download