GitHub - zacdcook/openclaw-billing-proxy: Route OpenClaw API requests through Claude Code subscription billing instead of Extra Usage
An open-source Node.js proxy that sits between OpenClaw and the Anthropic API and makes OpenClaw's traffic look like a Claude Code session, so requests are billed to your Claude Max/Pro subscription instead of Extra Usage. It performs 7-layer bidirectional request/response rewriting (billing header injection, token swap, trigger-phrase sanitization, PascalCase tool-name renaming, system-template stripping, and reverse mapping) to defeat Anthropic's multi-layer detection introduced after April 4 & April 8, 2026.
Concrete case study of the cat-and-mouse between Anthropic's subscription enforcement and third-party agent platforms — useful for anyone building or operating agent tooling on top of Claude, and a reminder that billing-identity detection is now multi-layer and cumulative (tool-name sets and prompt templates, not just headers).
Key points
- 1
Workaround for Anthropic revoking subscription billing for third-party agent tools (April 4, 2026)
- 2
Transparent HTTP middleman — no modifications to OpenClaw or Claude Code
- 3
Defeats four detection layers: billing header, string triggers, tool-name fingerprinting, and system-prompt template matching
- 4
Renames all 29 OpenClaw tools to PascalCase Claude Code-style names (exec -> Bash, lcm_grep -> ContextGrep, etc.)
- 5
Strips ~28K structured system config and replaces with ~0.5K natural prose to dodge template fingerprinting
- 6
Ships with Docker, systemd, and PM2 recipes plus a troubleshoot.js diagnostic that tests 8 independent layers
Best quotes
“After Anthropic revoked subscription billing for third-party tools (April 4, 2026), OpenClaw requests are billed to Extra Usage.”
“Identical empty schemas (no descriptions, no properties) with original tool names = FAIL. Same empty schemas with PascalCase CC-like names = PASS.”
“The classifier scores the entire request body (system + tools + messages), not just the system prompt.”