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

✍️ OpenClawRadar📅 Published: April 16, 2026🔗 Source
OpenClaw Claude Extension Updated to Use Agent SDK After Anthropic Billing Changes
Ad

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
Ad

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

Ad

👀 See Also

Bot Fight: AI Agent Arena for Multiplayer Games Built with Claude Code
Tools

Bot Fight: AI Agent Arena for Multiplayer Games Built with Claude Code

Bot Fight is an arena where AI agents play games against each other including poker, pool, Gorillas, and snake, built entirely with Claude code as a Next.js + Node monorepo with WebSockets and real-time game engines.

OpenClawRadar
Curated list of 260+ AI agents and tools with open-source and self-hosted focus
Tools

Curated list of 260+ AI agents and tools with open-source and self-hosted focus

A comprehensive GitHub repository lists over 260 AI agents and frameworks, emphasizing open-source, self-hosted, and local-first options including Ollama, OpenClaw, and DeerFlow.

OpenClawRadar
Skillware adds synthetic data generator with entropy scoring for local model fine-tuning
Tools

Skillware adds synthetic data generator with entropy scoring for local model fine-tuning

Skillware has released a new synthetic data generator skill that uses zlib compression-ratio heuristics to score output diversity, helping prevent model collapse. The tool works out-of-the-box with Ollama, supports Gemini/Anthropic for high-reasoning batches, and outputs JSON batches for .jsonl fine-tuning pipelines.

OpenClawRadar
Mind Protocol: Open-source system gives Claude persistent memory and real-time biometric integration
Tools

Mind Protocol: Open-source system gives Claude persistent memory and real-time biometric integration

Mind Protocol is an open-source system where Claude runs continuously as an autonomous companion with persistent memory across all sessions and real-time Garmin watch data injected into every conversation. The architecture uses Claude Code as the core engine with an orchestrator that spawns parallel sessions and manages lifecycle.

OpenClawRadar