OpenClaw Claude Extension Updated to Use Agent SDK After Anthropic Billing Changes

The developer of an OpenClaw extension for Claude has rewritten their implementation to use Anthropic's official claude-agent-sdk after encountering billing issues with the previous CLI-based approach.
What Changed
Anthropic started detecting the Claude CLI's -p (print/headless) mode server-side and reclassifying it as "third-party app usage." This caused usage to bill against a separate extra usage credit pool instead of users' Max plan limits, with users receiving messages about claiming $200 credits.
Failed Workarounds
- PTY-based spawning so the CLI sees a real terminal — didn't help because detection is server-side metadata
- Full interactive mode without
-p— the Ink TUI swallows programmatic input and output is unparseable (ANSI codes, spinners, words with no spaces) - Session reuse, request jitter, stdin piping — all cosmetic changes that don't affect what the CLI reports upstream
The Solution
The developer switched to the claude-agent-sdk after discovering that Nanoclaw (26k stars) uses this approach without billing issues. The SDK provides the same full Claude Code experience — tool use, file editing, multi-step reasoning, MCP servers, memory — but as a Node.js library instead of a subprocess.
The SDK authenticates through existing Claude Code login, so it bills as regular Max plan usage rather than third-party usage. The architecture remains similar: OpenClaw gateway receives requests, hands them to the extension, which calls query() from the SDK, parses streaming messages, and translates them back to OpenAI-compatible SSE.
Installation
git clone https://github.com/siimvene/openclaw-claude-runner.git
cd openclaw-claude-runner
bash install.sh
claude login
openclaw gateway restart
Compatibility
Works with Opus 4.6, Opus 4.5, Sonnet 4.6, Sonnet 4, Haiku 4.5 — whatever the SDK supports. The developer also rewrote the Codex runner using OpenAI's codex-sdk for the OpenAI side.
This approach maintains the same functionality while avoiding the billing classification issues that affected the CLI-based implementation.
📖 Read the full source: r/openclaw
👀 See Also

Claude Code Prompt Architecture Reverse-Engineered for Local Models
A clean-room reimplementation of Claude Code's 26-prompt architecture is now available on GitHub, offering system prompts, tool prompts, safety rules, memory compression, and verification patterns for building coding agents on local models like Ollama, llama.cpp, or vLLM.

Hollow AgentOS Reduces Claude Code Token Usage by 68.5% with JSON-Native OS Approach
Hollow AgentOS, a JSON-native operating system layer for AI agents, reduces Claude Code token usage by 68.5% by eliminating wasteful shell command overhead. The tool plugs into Claude Code via MCP and runs local inference through Ollama.

Meeting Summarization on a 6GB GPU: qwen3.5:0.8B Works at 57s, Granite 4 350M Hallucinates
VoiceFlow v1.6.0 adds local meeting recording and summarization. Benchmarking sub-1B models on a 6GB RTX 3060: qwen3.5:0.8B produces structured summaries in 57s at 2.2GB VRAM, while Granite 4 350M hallucinates badly.

OctoArch v5.0: Zero-Trust B2B Runtime with JSON-Based AI Personas
OctoArch v5.0 is a zero-trust B2B cognitive runtime built for strict enterprise use cases like fiscal/invoice extraction. It replaces text-based prompting with JSON-defined AI personas and implements path jailing to prevent server attacks.