[D] We reimplemented Claude Code entirely in Python — open source, works with local models
Open-source Python clone of Claude's coding agent works with local models like Qwen3-Coder-30B for free.
HarnessLab has launched Claw Code Agent, an open-source Python reimplementation of Anthropic's Claude Code agent architecture. Based on reverse-engineering work shared by developer Fried_rice, the project addresses a key accessibility issue: while the original Claude Code is built with npm/TypeScript/Rust, Claw Code Agent provides a pure Python implementation that's more accessible to the Python developer community. This allows developers to easily read, modify, and extend the codebase for their specific needs.
The system enables full agentic coding loops with comprehensive tool calling capabilities including file read/write/edit operations, glob pattern matching, grep searches, and shell command execution. It features slash commands like /help, /context, /tools, /memory, /status, and /model for interactive control, along with a context engine that discovers CLAUDE.md files and supports session persistence for saving and resuming agent runs. The architecture includes tiered permissions ranging from read-only to write, shell, and unsafe modes for security control.
Claw Code Agent works with any OpenAI-compatible backend including vLLM, Ollama, and LiteLLM Proxy, with documented support for running the Qwen3-Coder-30B-A3B-Instruct model fully locally and free of charge. The repository is actively maintained with community contributions welcomed through issues and pull requests, positioning it as a practical alternative for developers seeking to leverage AI coding assistants without dependency on proprietary APIs.
- Pure Python implementation of Claude Code architecture based on reverse-engineering work
- Works with local models like Qwen3-Coder-30B-A3B-Instruct via OpenAI-compatible backends (vLLM, Ollama)
- Full agentic coding with file editing, shell access, slash commands, and session persistence
Why It Matters
Democratizes AI coding assistants by enabling local, free alternatives to proprietary systems like Claude Code, giving developers full control and customization.