#OPenclaw claude issues
1 messages · Page 1 of 1 (latest)
Let me check the current docs/source so I don't make up config keys.
First check openclaw --version.
A few things matter here:
-
Use
claude-cli/*, notanthropic/*
If your model isanthropic/*, that is the normal API path, so it will bill API usage. -
Upgrade OpenClaw if you're not on a recent build
There was a recent fix for Claude CLI runs that stopped marking them as host-managed. That host-managed flag could push Claude into Anthropic's separate extra-usage lane instead of normal CLI subscription behavior. -
Re-run onboarding with Claude CLI auth
Useopenclaw onboard, choose Anthropic Claude CLI, then checkopenclaw models status. -
Do not force Anthropic API env into the Claude CLI backend
If you explicitly injectANTHROPIC_API_KEYor similar, remove that for the Claude CLI lane. Subscription mode should rely on the local Claude CLI login.
One important caveat: Anthropic still seems to route some third-party app flows, especially MCP/tool and image turns, to extra-usage billing. So plain text claude -p style turns can work, while tool-heavy OpenClaw CLI-backend turns may still hit 402 out of extra usage.
Docs:
https://docs.openclaw.ai/providers/anthropic
https://docs.openclaw.ai/gateway/cli-backends
https://docs.openclaw.ai/help/faq#do-you-support-claude-subscription-auth-claude-pro-or-max
If you paste these, I can tell which case you're hitting:
openclaw --versionopenclaw models status- the Claude CLI backend log lines around the 402
jorisbot@Joriss-MacBook-Air ~ % openclaw --version
OpenClaw 2026.4.22 (00bd2cf)
jorisbot@Joriss-MacBook-Air ~ % openclaw models status
🦞 OpenClaw 2026.4.22 (00bd2cf) — I'm not magic—I'm just extremely persistent with retries and coping strategies.
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : claude-cli/claude-sonnet-4-6
Fallbacks (3) : claude-cli/claude-sonnet-4-5, claude-cli/claude-opus-4-6, claude-cli/claude-opus-4-5
Image model : -
Image fallbacks (0): -
Aliases (1) : sonnet -> claude-cli/claude-sonnet-4-6
Configured models (6): claude-cli/claude-sonnet-4-5, claude-cli/claude-sonnet-4-6, claude-cli/claude-opus-4-6, claude-cli/claude-opus-4-5, claude-cli/claude-opus-4-7, claude-cli/claude-haiku-4-5
Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (1): moonshot (1)
- claude-cli effective=synthetic:plugin synthetic auth | synthetic=plugin-owned | source=plugin synthetic auth
- google effective=env:AIzaSyCC...q54V7qYI | env=AIzaSyCC...q54V7qYI | source=env: GOOGLE_API_KEY
- moonshot effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=1, api_key=0) | moonshot:manual=token:sk-7lLtT...p2zThQCB
- openai effective=models.json:sk-proj-...MwI6WjsA | models.json=sk-proj-...MwI6WjsA | source=models.json: ~/.openclaw/agents/main/agent/models.json
- or-custom effective=models.json:sk-or-v1...5ade9f5d | models.json=sk-or-v1...5ade9f5d | source=models.json: ~/.openclaw/agents/main/agent/models.json
OAuth/token status
- moonshot
- moonshot:manual static
jorisbot@Joriss-MacBook-Air ~ %
- moonshot:manual static
I’m checking whether your version already includes the Claude CLI subscription fix, because your config itself looks sane.
Thanks, that output is actually pretty helpful.
Your setup looks correct for Claude CLI subscription mode:
Default: claude-cli/claude-sonnet-4-6Shell env: off- no Anthropic API key/profile is being selected
2026.4.22is newer than the old Claude CLI host-managed bug fix
So this probably is not “OpenClaw is using the Anthropic API key path instead of subscription”.
What’s more likely is this:
Anthropic is classifying the OpenClaw turn as a third-party app / extra-usage turn, especially for tool, MCP, or image usage. OpenClaw’s own docs/tests call this out, and the Claude subscription smoke disables MCP/tool and image probes for exactly that reason.
So, bluntly, there may be nothing left to fix in OpenClaw config here.
Quick check
Run one plain text, no-tools turn through OpenClaw:
openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "say hello" --json
If that works, but normal agent/tool turns hit 402 out of extra usage, then you’ve confirmed it is the Anthropic extra-usage lane, not a bad OpenClaw routing setup.
If you want the practical workaround
- Claude CLI subscription: okay for plain text fallback style usage
- Anthropic API key: safer path for full OpenClaw agent/tool usage
If the plain text test also fails, paste the --cli-backend-logs output from one failing run. I’d look for leaked env markers like ANTHROPIC_API_KEY or CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST, but based on your models status, I don’t think that’s the main issue.
Docs:
- https://docs.openclaw.ai/gateway/cli-backends
- https://docs.openclaw.ai/help/faq#do-you-support-claude-subscription-auth-claude-pro-or-max
If you paste one failing log block, I can tell you pretty quickly whether it’s a plain text turn or a tool/MCP turn hitting Anthropic’s extra-usage bucket.
jorisbot@Joriss-MacBook-Air ~ % openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "say hello" --json
10:53:02 [agent/cli-backend] claude skill plugin skipped missing skill file: /opt/homebrew/lib/node_modules/openclaw/skills/clawflow/SKILL.md
10:53:02 [agent/cli-backend] claude skill plugin skipped missing skill file: /opt/homebrew/lib/node_modules/openclaw/skills/clawflow-inbox-triage/SKILL.md
10:53:02 [agent/cli-backend] cli exec: provider=claude-cli model=sonnet promptChars=9
10:53:02 [agent/cli-backend] claude live session start: provider=claude-cli model=claude-sonnet-4-6 activeSessions=1
10:53:04 [agent/cli-backend] claude live session turn failed: provider=claude-cli model=claude-sonnet-4-6 durationMs=2393 error=FailoverError
10:53:04 [model-fallback/decision] model fallback decision: decision=candidate_failed requested=claude-cli/claude-sonnet-4-6 candidate=claude-cli/claude-sonnet-4-6 reason=billing next=none detail=You're out of extra usage. Add more at claude.ai/settings/usage and keep going.
FailoverError: You're out of extra usage. Add more at claude.ai/settings/usage and keep going.
jorisbot@Joriss-MacBook-Air ~ %
I’m checking one more thing: whether OpenClaw’s Claude flags differ from your working claude --print path in a way that Anthropic treats differently.
Yep, that’s the smoking gun.
Your plain OpenClaw Claude CLI turn is failing on:
openclaw infer model run --model claude-cli/claude-sonnet-4-6 --prompt "say hello" --json
So this is not:
- a tool/MCP-only problem
- an Anthropic API key being selected by mistake
- the old host-managed bug, since
2026.4.22already includes that fix
It looks like Anthropic is classifying OpenClaw’s Claude CLI backend lane itself as “extra usage” on your account, even though simpler Claude CLI usage works.
The important difference is:
- your working path: simple Claude CLI text call
- OpenClaw path: Claude CLI
-pwithstream-json+ persistent/live session behavior
That points to a Claude/Anthropic billing-classification issue, not a bad OpenClaw auth config.
Best next check
Try these two direct Claude commands:
1. OpenClaw’s subscription smoke-style probe
claude -p "Reply exactly: OK" \
--output-format text \
--model sonnet \
--permission-mode bypassPermissions \
--setting-sources user \
--strict-mcp-config \
--mcp-config '{"mcpServers":{}}' \
--no-session-persistence
2. Closer to OpenClaw’s actual backend mode
printf 'say hello' | claude -p \
--output-format stream-json \
--include-partial-messages \
--verbose \
--model sonnet \
--permission-mode bypassPermissions \
--setting-sources user
If #1 works but #2 fails with extra usage, then the issue is basically confirmed: OpenClaw’s Claude backend mode is landing in Anthropic’s extra-usage bucket.