DEV Community

Cover image for Claude Code Charges Extra for 'OpenClaw' Git Commits
Max Quimby
Max Quimby

Posted on • Originally published at computeleap.com

Claude Code Charges Extra for 'OpenClaw' Git Commits

On April 30, 2026, a 1,033-point Hacker News thread hit the front page with a title that read like satire: "Claude Code refuses requests or charges extra if your commits mention 'OpenClaw'." The top comment wasn't outrage — it was a reproduction recipe. mkdir anthropic-test, git init, write a single commit message containing the word OpenClaw, then call claude in that empty repo. Either the request gets refused outright, or your $200/month Max subscription quietly stops counting and the call gets billed pay-as-you-go to your "extra usage" balance.

📖 Read the full version with charts and embedded sources on ComputeLeap →

Hacker News front-page thread: 'Claude Code refuses requests or charges extra if your commits mention OpenClaw' — 1,033 points, 576 comments. Top comment includes a reproduction recipe.

Theo Browne (t3.gg) caught the bug in the wild:

Tweet from Theo (@theo): Fun fact — if you have a recent commit that mentions OpenClaw in a json blob, Claude Code will either refuse your request or bill you extra money. This is an empty repo, I'm just calling Claude Code directly. Insanity.

This is not a one-off. It is the operational consequence of a policy Anthropic enforced on April 4 — Claude Pro and Max subscriptions can no longer route through "third-party harnesses" like OpenClaw, Cline, or any agent runtime that isn't an official Anthropic product. The detection logic now reaches into the contents of your local git history, and it is wrong often enough to be a problem.

This article walks through three things in order: (1) what's actually happening in your Claude Code requests, (2) the exact reproduction so you can verify it on your own machine, and (3) the concrete fix — installing cc-switch, the trending desktop runtime switcher (currently at 56,452 stars and on day-7 of GitHub's trending board), so you can keep working from a single CLI but route around the surcharge.

What's Actually Happening

There are two overlapping issues, and the discourse keeps confusing them. They are not the same thing.

Issue 1 — the policy. As of April 4, 2026, Anthropic's subscription OAuth tokens are restricted to first-party apps only (Claude.ai, Claude Code, Claude Desktop). Third-party agent harnesses must use a separate "Extra Usage" pay-as-you-go tier or a standalone API key. This was announced and enforced within weeks of OpenClaw's creator joining a competitor. The policy itself is defensible — flat-rate plans were being arbitraged through cheaper third-party clients — but the implementation has consistently surprised users.

Earlier Hacker News thread from April 4: 'Tell HN: Anthropic no longer allowing Claude Code subscriptions to use OpenClaw' — 828 points. Original announcement of the third-party harness ban.

Issue 2 — the bug. The detection mechanism scans recent commit messages and file paths in your repo for strings that look like third-party-harness usage. Per the Consumer Rights Wiki, the literal filename HERMES.md anywhere in your git history was enough to silently bypass a $200/month Max subscription and charge a user pay-as-you-go API rates instead. One subscriber lost over $200 in overcharges while 86% of their prepaid credits sat unused. The OpenClaw string in commit messages is the same class of bug: a substring match with no context awareness, no allowlist for "I'm just talking about this thing in a blog post," and no opt-out flag.

⚠️ You can trigger this on a repo that has never touched OpenClaw. A commit message like "document: link to OpenClaw blog post" is enough. The detector does not check whether OpenClaw is actually invoked at runtime — only whether the string appears in your recent git log.

The bug surfaced as the third story in the institutional anti-AI cluster on HN that morning — alongside Zig project's anti-AI contribution policy (#1, 569 pts) and Mozilla's opposition to Chrome's Prompt API (#2, 428 pts). Three independent surfaces — a language vendor, a browser vendor, and an AI lab itself — all formalizing constraints on what AI is allowed to touch in 24 hours. The OpenClaw incident is the lab self-inflicted version.

The Reproduction Recipe

Here is the minimal recipe from the HN top comment, expanded so you can run it without guessing:

# 1. Empty workspace, no third-party tooling installed
mkdir anthropic-claude-test && cd anthropic-claude-test
git init
git config user.email "test@example.com"
git config user.name "Test"

# 2. Single commit that contains the magic string
echo "# notes" > README.md
git add README.md
git commit -m "doc: planning to evaluate OpenClaw vs Claude Code"

# 3. Call Claude Code directly. You are logged in via your normal
#    Pro or Max subscription. No env vars, no MCP servers, nothing.
claude "what does this README say?"
Enter fullscreen mode Exit fullscreen mode

Two outcomes have been reported by readers in the HN thread:

  1. Hard refusal. The CLI returns an error message implying third-party tool detection.
  2. Silent surcharge. The request completes, but the call is billed against your "extra usage" balance instead of being counted toward your Max subscription's flat rate. You only notice when your invoice arrives.

GIGAZINE confirmed the reproduction independently for the HERMES.md variant of the same detector. PromptZone wrote up the OpenClaw variant with screenshots of the billing dashboard showing the unexpected line items. The behavior is reproducible, not folklore.

r/ClaudeAI thread: 'Anthropic just blocked OpenClaw — and the OpenClaw-detector is now scanning git commits' — 14,723 upvotes, 2,841 comments.

💡 Why this matters beyond the bug: the current Max plan behavior — quota exhaustion in 90 minutes, as we documented two weeks ago, plus this commit-substring detector — means subscribers are being asked to pay for a flat-rate plan whose flat-rate guarantee has substantively narrowed. The escape hatch isn't theoretical; it's pragmatic.

The Fix: cc-switch

cc-switch is a cross-platform desktop app — Rust under the hood, Tauri shell — that puts every major coding-agent runtime behind one switchable interface. As of today's GitHub trending board it sits at 56,452 total stars, +971 in the last 24 hours, day 7 of its trending streak. It is one of seven agent-skills/agent-harness repos on the top-15 trending list this morning, and the only one that solves the "I want to keep my workflow but stop paying the surcharge" problem directly.

What cc-switch actually does:

  • One-click runtime switch. Toggle between Claude Code, Codex CLI, OpenCode, OpenClaw, and Gemini CLI without manually editing env vars or rewriting your shell config.
  • Multi-endpoint API key management. Store separate API keys per runtime and per provider, with built-in latency tests so you can route to whichever endpoint is fastest right now.
  • 4-tier model config. Granular selection across Haiku / Sonnet / Opus / Custom (and the equivalents for OpenAI and Google) so you don't have to guess which tier a given prompt needs.
  • Unified MCP server management. MCP servers configured once, available across runtimes — no copy-paste between ~/.claude/, ~/.codex/, and ~/.opencode/ config trees.
  • Skills extension management. Mirrors the agent-skills pattern that Cursor and Mattpocock have been driving — your skills/ directory ships across every runtime cc-switch can launch.

We covered cc-switch in general terms a few weeks back. What changed this week is that the OpenClaw-detector incident has turned cc-switch from a "nice to have" into a defensive tool. The reasoning is direct: even if you don't actively use OpenClaw, a single stray commit message can quietly drain your prepaid credits. cc-switch makes it trivial to keep using your Max subscription for first-party work and route everything else through an API-key-billed runtime so the surcharge logic never gets a chance to fire.

Installing cc-switch

The desktop app is the recommended path. Per the official setup guide, here's the install for each platform:

macOS (Homebrew, recommended):

brew tap farion1231/ccswitch
brew install --cask cc-switch
Enter fullscreen mode Exit fullscreen mode

Windows: download the .msi installer or portable .zip from the Releases page.

Linux: download the .deb package or .AppImage from the same Releases page.

If you want a terminal-only fork, there's SaladDay/cc-switch-cli, a CLI port that drops the desktop UI entirely. It supports Claude Code, Codex, and Gemini CLI but not yet OpenCode or OpenClaw, so for full coverage today the desktop app is still the better choice.

First-run setup

When cc-switch launches the first time, it auto-imports your existing Claude Code, Codex, and Gemini CLI configs and treats them as your default providers. You don't have to start from scratch.

The setup that actually solves the surcharge problem looks like this:

  1. Add a "Claude API Key" provider alongside your existing "Claude Code (subscription)" provider. Click Add Provider → choose Claude (API) preset → paste your standalone API key (from console.anthropic.com, separate from your Pro/Max subscription).
  2. Add OpenCode as a fallback runtime. OpenCode is the open-source coding agent with 152K stars and supports nearly every model provider. cc-switch ships with an OpenCode preset; just install OpenCode (npm i -g @opencode-ai/cli or whatever the current install command is) and cc-switch will detect it.
  3. Add Gemini CLI for the long-context cases. Gemini's free tier — 1,000 requests/day with 1M context — covers a surprisingly large fraction of "I need to dump this whole repo at the model" tasks without touching your Anthropic balance.
  4. Add Codex CLI if you have an OpenAI Plus or Pro subscription. The Rust rewrite is meaningfully faster on token throughput than Claude Code right now.

Once configured, switching is a single toggle in the menu bar (macOS) or system tray (Windows/Linux). The active provider's env vars get swapped in for your shell session and any newly-launched terminals.

The decision tree, in practice

This is the routing I've landed on after two weeks of running cc-switch as my default:

Task Runtime Why
Routine refactor on a repo with a clean commit history Claude Code (subscription) Cheapest per-call; quality is best in class
Any repo where I've ever mentioned OpenClaw, Hermes, Cline, or the like in a commit Claude API key (extra usage on purpose) OR OpenCode Removes the surcharge-detection lottery
Long context dump (≥200K tokens) Gemini CLI Free tier covers it; Claude Opus would burn quota in one shot
Multi-step agent tasks where I need maximum tool reliability Codex CLI Fastest token throughput; GPT-5-Codex is currently best on multi-tool chains
Anything I want to be fully reproducible / auditable OpenCode + local model OSS runtime + local Ollama means zero vendor surprise

The point is not that any one of these dominates. It's that you stop being a single-vendor-failure story. The week Anthropic decides your commit history disqualifies you from your own subscription, you press one toggle and keep working.

Why This Story Has Legs

It's tempting to read the OpenClaw-detector as a one-off bug that will get patched in a few days. The pattern says otherwise. Here are the three reasons this is the start of something, not the end of it.

1. Lab vs. OSS-agent-runtime is now a category, not a feud. Today's GitHub trending board has warpdotdev/warp (+8,262 stars), mattpocock/skills (+6,175), obra/superpowers (+1,623), cc-switch (+971), and three more agent-tooling repos in the top 15 — totaling +18,945 stars in 24 hours. Seven of fifteen. This is no longer a viral cluster. It's a category. The first-party Claude Code experience is competing with a fast-moving OSS substrate, and Anthropic's response so far has been to close more doors rather than to win on product.

2. The detection logic is upstream of any single bug. Whether the magic string is OpenClaw, HERMES.md, or whatever Anthropic decides to add next month, scanning local git history for substring matches is a brittle abstraction. It's easy to imagine the next iteration scanning your ~/.config/ directory or your shell history. Routing your work through a runtime switcher means none of those decisions affect you operationally — you opt in to first-party billing where it makes sense and out where it doesn't.

3. The community archive is consolidating. clawd.rip — "Everything That Went Wrong With Claude" — is now a community-maintained timeline of every Anthropic incident this quarter, indexed by date. Indie Hackers has an active thread on the platform-risk implications. A Medium piece frames it explicitly: the OpenClaw ban exposed Anthropic's real problem. The shift in tone from individual complaints to category-level analysis happened over about ten days. That's the same arc that preceded earlier developer migrations away from Heroku and Twitter's API.

For a deeper take on the broader Anthropic vs OpenAI rivalry shaping these platform decisions, we've written before about how the lab business model squeezes power-user budgets. The cc-switch / OpenCode / Codex axis is what that squeeze produces in the developer tool layer.

What to Do This Afternoon

If you only have fifteen minutes:

  1. Audit your repos. git log --all --oneline | grep -iE "openclaw|hermes\.md|cline|aider|opencode" will tell you which repositories will trigger the detector. Don't try to rewrite history on a shared repo; just know which projects are flagged.
  2. Install cc-switch. brew install --cask cc-switch on macOS, or grab the installer from the Releases page.
  3. Add a standalone Claude API key as a second provider. Even if you don't use it daily, having it ready means you can flip away from subscription billing the moment a flagged repo is in your working set.
  4. Bookmark clawd.rip and the Apiyi quick-fix guide. When the next variant of this surcharge fires, you'll already know where the playbook lives.

If you want a video walkthrough of the multi-runtime setup, both "I Replaced OpenClaw and Hermes With This Claude Code Setup" and "The Claude Code Setup Nobody Shows You (Replaces OpenClaw + Hermes)" are recent and walk the cc-switch + OpenCode flow end-to-end.

The Contrarian Read

Here is the unfashionable take. Anthropic is not wrong to want subscriptions to mean what they say. Pro and Max plans were being routed through cheaper third-party clients, and the unit economics on flat-rate Opus 4.7 access have always been precarious. A platform that loses money on every power user is not a platform that survives.

But the implementation is what's generating the backlash, not the policy. A clean way to enforce this would be: an opt-in flag (anthropic config set source first-party-only), a clear billing-side warning before a surcharge fires, and a refund SLA when the detector misfires. Instead Anthropic shipped a substring detector, initially refused refunds for the HERMES.md misfire, and only reversed course after the HN front-page hit 828 upvotes. That's not a policy problem. That's a product problem.

The fix isn't to migrate off Claude — Opus 4.7 is still the best model on real-world coding tasks. The fix is to stop being a single-vendor story. cc-switch is one of the cleaner answers.


Further reading on ComputeLeap:


Originally published at ComputeLeap

Top comments (0)