OpenClaw extension routes requests through Claude Code CLI instead of API

OpenClaw Claude Runner Extension
An OpenClaw extension has been released that routes requests through the Claude Code CLI binary instead of using the Anthropic API. This approach avoids per-token API costs and potential TOS violations while providing the complete Claude Code feature set.
How It Works
The extension functions as a gateway plugin. When OpenClaw gateway receives a request, it hands it to this extension, which then spawns the Claude CLI as a subprocess. The extension executes the command claude -p "your prompt" --output-format stream-json, parses the NDJSON output, and translates it back to OpenAI-compatible Server-Sent Events (SSE). The gateway remains unaware it's not communicating with a standard API.
Features and Compatibility
- Provides full Claude Code experience including tool use, file editing, multi-step reasoning, MCP servers, and memory
- Works at the max plan flat rate instead of per-token API pricing
- Compatible with Claude models supported by Claude Code CLI: Opus 4.5, Sonnet 4.6, Sonnet 4, Haiku 4.5
Installation
Installation requires five commands:
git clone https://github.com/siimvene/openclaw-claude-runner.git
cd openclaw-claude-runner
bash install.sh
claude login
openclaw gateway restartArchitecture and Inspiration
The extension was inspired by the Jinn project, which implements similar functionality as a standalone service. The developer opted to create an OpenClaw extension instead, which integrates cleanly with the existing gateway without replacing any components.
This approach is particularly useful for developers who want to use Claude Code features through OpenClaw while avoiding API costs and maintaining compliance with usage terms.
📖 Read the full source: r/openclaw
👀 See Also

YourMemory: AI memory with biological decay hits 59% recall on LoCoMo-10
YourMemory gives AI agents persistent memory using Ebbinghaus forgetting curve and graph-enhanced retrieval. Benchmarked at 59% Recall@5 on LoCoMo-10, 2× better than Zep Cloud.

Helix: Open-Source Framework Turns Claude into Personal AI Agent for macOS
Helix is an open-source framework that connects Claude via Claude Code in Terminal to macOS through four MCP server plugins, enabling Claude to control applications, maintain persistent memory, run scheduled tasks, and operate with local voice processing.

Improving Claude Code Sessions with claude-self-improve
Claude-self-improve is a CLI tool that enhances Claude Code's AI performance by analyzing session data and updating memory files automatically.

MCP Gateway for Secure Remote Access to Internal Tools
An open-source MCP gateway aggregates multiple MCP tool servers into a single connection, enabling secure access via Claude Desktop without exposing public endpoints. It uses OpenZiti/zrok for zero-trust networking and requires only one configuration entry with a share token.