Error is as follows. It had a dead credit card in there today that \I changed. I already have a new api. Not sure what is wrong at this point. β οΈ Agent failed before reply: All models failed (2): anthropic/claude-sonnet-4-6: Provider anthropic has billing issue (skipping all models) (billing) | anthropic/claude-opus-4-6: Provider anthropic has billing issue (skipping all models) (billing).
Logs: openclaw logs --follow
#Stuck on a billing error loop with Anthropic where I cannot refresh that the billing is sufficient ?
21 messages Β· Page 1 of 1 (latest)
i am on local running on a mac m1. we have restarted and everything is configured properly on terminal. '=
still receiving the error message
I think this is probably OpenClaw keeping the Anthropic profile in a billing-disabled state after the old card failed.
Changing the card or even rotating the API key at Anthropic does not always clear the OpenClaw-side disable immediately.
Please paste these:
openclaw --version
openclaw models status --json
openclaw doctor
What Iβd look for in models status --json:
auth.unusableProfilesreason: "billing"disabledUntil
If that shows up, re-auth Anthropic explicitly:
openclaw models auth login --provider anthropic
If you are using a plain Anthropic API key, re-running onboarding is also fine:
openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"
Then verify with a live probe:
openclaw models status --probe --probe-provider anthropic
One gotcha: if OpenClaw is actually using Claude CLI auth instead of your new API key, changing the API key will not help. openclaw models status will show which auth path is active.
Docs:
https://docs.openclaw.ai/providers/anthropic
https://docs.openclaw.ai/cli/models
https://docs.openclaw.ai/help/faq
If you paste the auth.unusableProfiles bit, I can tell you exactly what is stuck.
Ah, the local Mac detail actually matters.
If your gateway is running as the macOS LaunchAgent, βit works in Terminalβ is not enough. launchd often does not inherit your shell env, so the running gateway may still be seeing the old/no Anthropic key.
Try this exact path:
- Put the key in:
~/.openclaw/.env
with:
ANTHROPIC_API_KEY=sk-ant-...
- Then run:
openclaw --version
openclaw gateway restart
openclaw models status --json
openclaw models status --probe --probe-provider anthropic
- If
models status --jsonstill showsauth.unusableProfileswithreason: "billing", re-auth Anthropic explicitly:
openclaw models auth login --provider anthropic
That should clear stale provider lockouts.
If it still prefers an old/pinned Anthropic profile after that, also run:
openclaw models auth order clear --provider anthropic
Docs for the two relevant gotchas:
https://docs.openclaw.ai/help/faq
https://docs.openclaw.ai/providers/anthropic
If you paste the output of openclaw models status --json, I can usually spot the exact failure pretty fast.
Got it. If itβs still saying billing after restart, then we need to stop guessing and inspect the auth state.
Please paste these exact outputs:
openclaw --version
openclaw models status --json
openclaw models auth order get --provider anthropic
openclaw doctor
Before that, Iβd also try this exact reset sequence once:
openclaw models auth order clear --provider anthropic
openclaw models auth login --provider anthropic
openclaw gateway restart
openclaw models status --probe --probe-provider anthropic
Why: there are 2 common causes here:
- stale billing-disabled auth state (
disabledUntil/reason: billing) - OpenClaw is still using the wrong Anthropic profile, not the new key you expect
openclaw models status --json will show that pretty clearly.
If you paste that JSON, I can tell you the next step instead of making you poke at random stuff.
can i submti screenshots here for clarity
Yes, absolutely. Screenshots are fine.
Best ones to send:
openclaw models status --jsonopenclaw doctoropenclaw models auth order get --provider anthropic- the relevant
openclaw logs --followlines showing the Anthropic billing error
Please redact API keys, tokens, and email addresses first.
If you can paste text, thatβs even better for exact matching, but screenshots work too.
calor@Calors-iMac ~ % openclaw models status --probe --probe-provider anthropic
π¦ OpenClaw 2026.4.12 (1c0672b) β Powered by open source, sustained by spite and good documentation.
β
β
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : anthropic/claude-sonnet-4-6
Fallbacks (1) : anthropic/claude-opus-4-6
Image model : -
Image fallbacks (0): -
Aliases (2) : sonnet -> anthropic/claude-sonnet-4-6, opus -> anthropic/claude-opus-4-6
Configured models (2): anthropic/claude-sonnet-4-6, anthropic/claude-opus-4-6
Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- anthropic effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | anthropic:default=sk-ant-a...eYKMggAA [disabled:billing 8m]
- google effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | google:default=AIzaSyB8...EtiMMMjE
OAuth/token status
- none
Auth probes
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ¬βββββββββββββ
β Model β Profile β Status β
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββΌβββββββββββββ€
β anthropic/claude-sonnet-4-6 β anthropic:default (api_key) β ok Β· 4s β
βββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ΄βββββββββββββ
Probed 1 target in 8.9s
calor@Calors-iMac ~ %
Yep, this is the smoking gun.
Auth probes ... okmeans Anthropic accepts your key now[disabled:billing 8m]means OpenClaw still has the profile temporarily marked billing-disabled from the earlier card failure
So this is now a local backoff state, not a bad API key.
What to do:
- Wait the 8 minutes for that disable window to expire, then retry.
- If you want to try clearing it immediately, run:
openclaw models auth login --provider anthropic
- Then check again with:
openclaw models status --probe --probe-provider anthropic
You should stop seeing the [disabled:billing ...] bit.
So, good news, your key looks fine. You probably do not need to rotate it again.
Docs:
https://docs.openclaw.ai/cli/models
https://docs.openclaw.ai/help/faq
If it still shows disabled:billing after the timer should be gone, paste openclaw models status --json, because then we may be looking at a stuck auth-state entry.
π¦ OpenClaw 2026.4.12 (1c0672b) β Built by lobsters, for humans. Don't question the hierarchy.
β
β
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : anthropic/claude-sonnet-4-6
Fallbacks (1) : anthropic/claude-opus-4-6
Image model : -
Image fallbacks (0): -
Aliases (2) : sonnet -> anthropic/claude-sonnet-4-6, opus -> anthropic/claude-opus-4-6
Configured models (2): anthropic/claude-sonnet-4-6, anthropic/claude-opus-4-6
Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- anthropic effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | anthropic:default=sk-ant-a...eYKMggAA
- google effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | google:default=AIzaSyB8...EtiMMMjE
OAuth/token status
- none
Auth probes
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ¬βββββββββββββ
β Model β Profile β Status β
βββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββΌβββββββββββββ€
β anthropic/claude-sonnet-4-6 β anthropic:default (api_key) β ok Β· 3.6s β
βββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ΄βββββββββββββ
Probed 1 target in 8.3s
calor@Calors-iMac ~ %
This looks clean now.
The important parts are:
- no more
[disabled:billing ...] - Anthropic probe is
ok
So your Anthropic key/auth path is healthy now. π
Next check, run one direct model test:
openclaw infer model run --model anthropic/claude-sonnet-4-6 --prompt "say hi" --json
If that works, the billing problem is basically cleared, and the old failure you saw was from the earlier disabled state. Then just try a fresh new message/session.