⚡ C++ Reimplementation of Claude Code's Agent Runtime ⚡
Inspired by the leaked Claude Code source — rebuilt from scratch in C++
Important
This repository is under active migration to a full C++ runtime. Current source files include transitional stubs while modules are ported and validated.
After the Claude Code source leak on March 31, 2026, dozens of repositories appeared attempting to run or redistribute the original system.
This project takes a different approach:
Reconstruct the core architecture of Claude Code — in C++ — from first principles.
- ❌ No leaked source code included
- ❌ No direct copying
- ✅ Clean-room reimplementation
- ✅ Systems-level runtime design
clawc is a clean-room C++ implementation of an AI agent harness —
inspired by the architectural patterns behind systems like Claude Code.
It focuses on:
- Tool orchestration
- Execution loops
- Command systems
- Task lifecycle management
- Runtime coordination
Most current implementations are:
- Python-heavy
- Hard to scale
- Weak in runtime control
This project explores:
What happens when agent systems are treated like real infrastructure?
- ⚡ Deterministic performance
- 🧠 Memory-level control
- 🧵 Fine-grained concurrency
- 🔧 Custom runtime engineering
If agents are the future — they need real engines, not wrappers.
An agent harness is the system that:
- Connects LLMs with tools
- Manages execution loops
- Tracks context and state
- Coordinates multi-step reasoning
This repo focuses on building that system from the ground up in C++.
.
├── src/
│ ├── core/ # runtime engine
│ ├── agent/ # execution loop
│ ├── tools/ # tool interface + registry
│ ├── commands/ # command system
│ ├── models/ # data structures
│ └── main.cpp
├── tests/
├── benchmarks/
└── README.md
git clone https://github.com/yourname/clawc
cd clawc
mkdir build && cd build
cmake ..
make
./clawc summaryRun tests:
ctestMost AI systems today are:
- Slow
- Script-heavy
- Hard to control
This project explores:
Agent systems as real infrastructure — not demos.
- This is a clean-room implementation
- No proprietary or leaked code is included
- Only high-level architectural patterns are studied
Don’t archive the system. Out-engineer it.
Because the future of AI isn’t prompts.
It’s runtime systems.
Early stage — rapidly evolving.
- Target language: C++
- Current phase: module-by-module runtime migration
- Temporary stubs may appear during active porting
- Goal: full architecture and runtime parity in C++
If you're interested in:
- AI agents
- systems programming
- runtime design
This repo is for you.