#Still cant use Anthropic CLI Auth on 2026.5.12

1 messages · Page 1 of 1 (latest)

tight spruce
#

Every time I try to connect to the anthropic CLI for auth and send a message it tells me that "You're out of extra usage" even though I'm nowhere near my limits.

WHich then triggers the failover and disables the auth for 5 hours with the reason 'Billing'.

I've tried resetting it multiple times and keep getting the same result. Not sure if it is a openclaw setup issue on my end.

summer fogBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

urban crownBOT
# tight spruce Every time I try to connect to the anthropic CLI for auth and send a message it ...

That specific text, You're out of extra usage, is coming from the Anthropic/Claude CLI side, not from OpenClaw inventing a quota state. OpenClaw then classifies it as a billing/usage failure and puts that auth profile into the default billing backoff window, which is why you see the 5 hour disable.

Can you paste the output of:

openclaw --version
claude --version
claude auth status --text
openclaw models status --json

Also try one direct Claude CLI call on the same machine/user that runs the gateway:

claude -p "Say ok"
urban crownBOT
# tight spruce Every time I try to connect to the anthropic CLI for auth and send a message it ...

If that direct claude -p call returns the same “out of extra usage” message, the problem is upstream in Claude CLI/account usage detection. If claude -p works but OpenClaw fails, then it’s much more likely an OpenClaw routing/auth-profile bug, and openclaw models status --json should show which profile is being marked unusable.

Docs I checked:
https://docs.openclaw.ai/providers/anthropic
https://docs.openclaw.ai/concepts/oauth
https://docs.openclaw.ai/gateway/authentication

tight spruce
#

The claude -p returned 'Ok' do you still want the paste of the above?

urban crownBOT
# tight spruce The claude -p returned 'Ok' do you still want the paste of the above?

Yes please, but the most useful two are:

openclaw --version
openclaw models status --json

If you can include this too, it helps confirm OpenClaw is seeing the same Claude CLI login:

claude auth status --text

Please skim/redact anything that looks like a token, account ID, email, or local private path before posting. Since claude -p works, the interesting part is now whether OpenClaw is selecting a stale/different Anthropic auth profile, or whether the 2026.5.12 cooldown state got stuck around the CLI profile.

tight spruce
#

The paste is too long for the chat here is teh claude auth status: claude auth status --text
Login method: Claude Max account
Organization: [REDACTED] Organization
Email: [REDACTED]

urban crownBOT
# tight spruce The paste is too long for the chat here is teh claude auth status: claude auth s...

That Claude status looks normal, and claude -p working is the key signal.

For the oversized OpenClaw JSON, can you run one of these smaller extracts instead?

openclaw --version
openclaw models status --json | jq '.auth.unusableProfiles'
openclaw models status --json | jq '.auth.profiles[]? | {id, provider, type, status, unusableReason, cooldownUntil, disabledUntil, disabledReason}'

If jq is not installed:

openclaw models status --plain

What I’m looking for: whether the Anthropic profile is marked disabledReason: "billing", whether it’s a CLI-backed profile, and whether OpenClaw has another stale Anthropic profile ahead of the working Claude CLI one.

tight spruce
#

does this snippet help:

"providersWithOAuth": [
"anthropic (1)",
"claude-cli (1)",
"openai-codex (1)"
],
"missingProvidersInUse": [],
"providers": [
{
"provider": "anthropic",
"effective": {
"kind": "profiles",
"detail": "~/.openclaw/agents/main/agent/auth-profiles.json"
},
"profiles": {
"count": 1,
"oauth": 1,
"token": 0,
"apiKey": 0,
"labels": [
"anthropic:claude-cli=OAuth [disabled:billing 5h]"
]
}
},
{
"provider": "claude-cli",
"effective": {
"kind": "profiles",
"detail": "~/.openclaw/agents/main/agent/auth-profiles.json"
},
"profiles": {
"count": 1,
"oauth": 1,
"token": 0,
"apiKey": 0,
"labels": [
"anthropic:claude-cli=OAuth [disabled:billing 5h]"
]

urban crownBOT
# tight spruce does this snippet help: "providersWithOAuth": [ "anthropic (1)", "c...

Yes, that helps a lot. It shows the active profile is exactly:

anthropic:claude-cli=OAuth [disabled:billing 5h]

Since direct claude -p works, I’d try a deliberate re-sync of the Claude CLI auth profile. Current OpenClaw code clears stale cooldown/disabled state when you run provider auth login:

openclaw models auth login --provider anthropic --method cli --set-default
openclaw models status

Then try one OpenClaw message again.

If it immediately flips back to disabled:billing 5h, please grab the version and the short status after the retry:

urban crownBOT
tight spruce
#

Tried sending a message via sonnet and it flipped straight back to disabled: billing.

urban crownBOT
# tight spruce Tried sending a message via sonnet and it flipped straight back to disabled: bil...

Yep, that pattern is now pretty clear.

claude -p "Say ok" working proves your local Claude CLI login is valid, but OpenClaw’s Claude CLI backend is still being treated by Anthropic/Claude Code as third-party app usage. There’s a current note in OpenClaw’s live test docs that this lane can route through extra-usage billing instead of normal subscription limits, which matches the exact error you’re seeing.

So this is probably not “bad login state” anymore. It’s Anthropic returning You're out of extra usage for the OpenClaw/CLI-backend run, and OpenClaw correctly turns that into disabled:billing 5h.

Practical options:

  • Use an Anthropic API key for OpenClaw if you need predictable Anthropic usage.
  • Use another subscription-style provider in OpenClaw for now.
  • If you think Claude Max should cover this path, file it as a bug/regression with the evidence: claude -p works, openclaw models auth login --provider anthropic --method cli --set-default succeeds, but the first OpenClaw Sonnet turn returns out of extra usage and marks anthropic:claude-cli as disabled:billing 5h.

Still worth including openclaw --version in the issue. Link: https://github.com/openclaw/openclaw/issues

Relevant docs:
https://docs.openclaw.ai/providers/anthropic
https://docs.openclaw.ai/gateway/cli-backends

tight spruce
#

can you write out the full issue for me pls

urban crownBOT
# tight spruce can you write out the full issue for me pls

Sure. Here’s a GitHub issue draft you can paste into https://github.com/openclaw/openclaw/issues:

Title: Anthropic Claude CLI auth works with `claude -p`, but OpenClaw marks `anthropic:claude-cli` as billing-disabled on first turn

## Summary

I’m trying to use Anthropic Claude CLI auth with OpenClaw on 2026.5.12. The local Claude CLI login appears valid and direct CLI calls work, but OpenClaw immediately receives/classifies an Anthropic “extra usage” error and disables the `anthropic:claude-cli` auth profile for 5 hours with `disabled:billing`.

## Environment

- OpenClaw version: TODO paste `openclaw --version`
- Claude CLI version: TODO paste `claude --version`
- Auth method: Claude CLI / Claude Max account
- Model tried: Sonnet
- Agent/profile: main / `anthropic:claude-cli`
urban crownBOT
urban crownBOT
urban crownBOT
# tight spruce can you write out the full issue for me pls

openclaw models auth login --provider anthropic --method cli --set-default
openclaw models status


After sending one OpenClaw message using Sonnet, the profile flips straight back to disabled billing.

Relevant `openclaw models status --json` snippet:

```json
{
  "providersWithOAuth": [
    "anthropic (1)",
    "claude-cli (1)",
    "openai-codex (1)"
  ],
  "missingProvidersInUse": [],
  "providers": [
urban crownBOT
# tight spruce can you write out the full issue for me pls

{
"provider": "anthropic",
"effective": {
"kind": "profiles",
"detail": "~/.openclaw/agents/main/agent/auth-profiles.json"
},
"profiles": {
"count": 1,
"oauth": 1,
"token": 0,
"apiKey": 0,
"labels": [
"anthropic:claude-cli=OAuth [disabled:billing 5h]"
]
}
},
{

urban crownBOT
# tight spruce can you write out the full issue for me pls

"provider": "claude-cli",
"effective": {
"kind": "profiles",
"detail": "~/.openclaw/agents/main/agent/auth-profiles.json"
},
"profiles": {
"count": 1,
"oauth": 1,
"token": 0,
"apiKey": 0,
"labels": [
"anthropic:claude-cli=OAuth [disabled:billing 5h]"
]
}
}
]
}

urban crownBOT
# tight spruce can you write out the full issue for me pls

## Expected behavior

If `claude -p` succeeds for the same user/host, OpenClaw’s Claude CLI backend should also be able to use that login, or at least expose enough detail to explain why Anthropic is treating the OpenClaw run differently.

## Actual behavior

OpenClaw immediately fails the first Sonnet turn and marks the profile:

```text
anthropic:claude-cli=OAuth [disabled:billing 5h]

The user-facing error before cooldown was:

urban crownBOT
# tight spruce can you write out the full issue for me pls

You're out of extra usage


## Notes

This does not look like a stale cooldown only. Re-running:

```bash
openclaw models auth login --provider anthropic --method cli --set-default

clears/resyncs, but the next OpenClaw turn flips the profile straight back to disabled:billing 5h.

The key difference is:

  • claude -p "Say ok" succeeds
urban crownBOT
# tight spruce can you write out the full issue for me pls
- OpenClaw using `anthropic:claude-cli` fails immediately with extra-usage/billing and disables the profile

This may be related to Anthropic/Claude Code treating OpenClaw’s CLI backend usage as third-party app / extra-usage billing rather than normal Claude Max subscription usage.

Before posting, add your exact openclaw --version and claude --version.

tight spruce
#

I got a response from clawstopper on github after I raised the issue,. The full response is too big so i'll do it in chunks here is the first part:

Best possible solution:

Keep the billing classification/backoff for Anthropic extra-usage responses and direct affected users to enable Anthropic Extra Usage or use Anthropic API-key auth for predictable billing.

Do we have a high-confidence way to reproduce the issue?

No high-confidence live reproduction is available without the reporter's Anthropic account. Source inspection does reproduce the OpenClaw side: when Claude CLI returns the reported extra-usage text, current main classifies it as billing and applies the default five-hour disabled state.

Is this the best way to solve the issue?

Not applicable as a source fix: OpenClaw is applying its documented billing response path to a vendor extra-usage response. A code change would need new logs proving wrong credential selection, stale blocked prompt metadata, or another OpenClaw-controlled request difference.

urban crownBOT
# tight spruce I got a response from clawstopper on github after I raised the issue,. The full ...

Yep, that first chunk lines up with what we found: OpenClaw is not misreading the cooldown; it’s seeing Anthropic’s “extra usage” response and intentionally putting that profile into billing backoff.

Send the rest when you’re ready. The main thing I’d look for in the remaining response is whether they suggest any diagnostic that proves OpenClaw is invoking Claude CLI differently from your successful claude -p test. Without that, the practical path is probably enabling Anthropic Extra Usage or switching OpenClaw to Anthropic API-key auth.

tight spruce
#

What I checked:

Issue report and live thread: The reporter is using OpenClaw 2026.5.12 and Claude 2.1.142; direct claude -p "Say ok" succeeds, while the first OpenClaw Sonnet turn returns You're out of extra usage and records anthropic:claude-cli=OAuth [disabled:billing 5h]. The existing ClawSweeper comment already made the same repo-boundary call, and the issue remains open.
OpenClaw Claude CLI invocation is not the direct smoke command: Current main configures the bundled Claude CLI backend with stream-json, partial messages, verbose output, user setting sources, OpenClaw MCP tool allowance, session handling, resume args, and appended system prompts, so direct claude -p proves local login but not the full OpenClaw backend shape. (extensions/anthropic/cli-backend.ts:31, 7715b29aa231)
Extra-usage text intentionally maps to billing: The failover matcher includes out of extra usage, draw from your extra usage, and extra usage is required in the billing category, matching the exact user-facing error in the report. (src/agents/pi-embedded-helpers/failover-matches.ts:180, 7715b29aa231)
Regression coverage locks the classification: The current test suite explicitly expects Anthropic extra-usage exhaustion variants, including You're out of extra usage, to return isBillingErrorMessage=true and classifyFailoverReason(...)=billing. (src/agents/pi-embedded-helpers.isbillingerrormessage.test.ts:254, 7715b29aa231)
Five-hour disabled state is the default billing cooldown: Auth profile usage defaults billing cooldowns to five hours, and the focused test verifies billing failures disable a profile for roughly five hours by default. (src/agents/auth-profiles/usage.ts:399, 7715b29aa231)
Docs already steer predictable billing to API keys: The Anthropic provider docs say Claude CLI reuses local login but recommend Anthropic API keys for the clearest billing path; live-test docs also call out that OpenClaw-style Claude CLI turns can route through extra-usage billing.

urban crownBOT
# tight spruce What I checked: Issue report and live thread: The reporter is using OpenClaw 20...

That second chunk is the important bit: claude -p was only a login smoke test, not an equivalent reproduction of OpenClaw’s actual Claude CLI invocation.

So I’d read their answer as: OpenClaw is behaving as designed once Anthropic returns the extra-usage error. The unresolved question is why Anthropic returns that for OpenClaw’s fuller CLI backend shape but not for a tiny direct prompt.

If you want to keep pushing the GitHub issue, the most useful follow-up would be asking whether there’s a supported minimal Claude CLI backend test mode that disables the OpenClaw extras one by one, especially MCP/tool allowance, appended system prompt, resume/session state, and stream-json/verbose mode. That would help isolate whether one of those flags pushes Claude Code onto the extra-usage path.

But for getting unstuck today, their recommendation is basically the real answer:

  • enable Anthropic Extra Usage for Claude Max, or
  • use Anthropic API-key auth for OpenClaw if you want predictable billing.
tight spruce
#

then the final bit:

Likely related people:

vincentkoc: Authored the merged inbound metadata fix for the earlier Claude CLI extra-usage filter report and appears in recent Anthropic provider docs history; useful routing if a new log proves another OpenClaw-generated prompt shape is being filtered. (role: adjacent feature-history owner; confidence: high; commits: 82d5c9848fe9, 9176898eea42, b5d434db6181; files: src/auto-reply/reply/inbound-meta.ts, src/auto-reply/reply/inbound-meta.test.ts, docs/providers/anthropic.md)
steipete: Recent GitHub path history shows work across Claude CLI backend behavior, Anthropic docs, and auth/failover-adjacent surfaces, making this a likely routing candidate for Claude CLI billing/account-boundary questions. (role: recent area contributor; confidence: medium; commits: f523bbfcd10d, c2f9de3935c3, 0e586bb48a31; files: extensions/anthropic/cli-backend.ts, extensions/anthropic/cli-shared.ts, src/agents/auth-profiles/usage.ts)
hclsys: Recent history on failover-matches.ts and its billing/error classification tests makes this person relevant if maintainers want to revisit how vendor error text is categorized. (role: recent classifier contributor; confidence: medium; commits: 398dd6e0b091; files: src/agents/pi-embedded-helpers/failover-matches.ts, src/agents/pi-embedded-helpers.isbillingerrormessage.test.ts)
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7715b29aa231.

urban crownBOT
# tight spruce then the final bit: Likely related people: vincentkoc: Authored the merged inb...

Thanks, that final bit is mostly maintainer-routing metadata. I would not tag those people manually or DM anyone; just leave the issue open with the evidence. Maintainers can route it internally if they think there’s an OpenClaw-side angle.

If you reply on GitHub, I’d keep it focused and say something like:

Thanks, that makes sense. I understand OpenClaw is correctly classifying Anthropic's extra-usage response as billing and applying the documented 5h backoff.

The remaining question for me is whether there is a supported way to run a minimal OpenClaw Claude CLI backend diagnostic that disables the extra backend pieces one at a time: MCP/tool allowance, appended system prompt, resume/session handling, and stream-json/verbose mode.

I’m not asking to change the billing classifier unless logs show OpenClaw is causing a different vendor path. I’m mainly trying to determine whether this is fully Anthropic account/Extra Usage behavior, or whether one specific OpenClaw CLI invocation option triggers the extra-usage route.

That keeps it actionable without turning it into a maintainer-routing thread.

tight spruce
#

its been marked as closed - not planned though: Thanks for writing this up. I checked the repo boundary, and this lives outside the OpenClaw source shell.

The reported OpenClaw behavior matches the current source contract: Anthropic extra-usage responses from the Claude CLI backend are classified as billing and placed on the default billing cooldown. The remaining action is Anthropic account or Extra Usage eligibility, unless a new report includes logs showing OpenClaw selected the wrong credential or produced a different upstream error.

So I’m closing this as outside the OpenClaw source repository rather than keeping it open as core work.

urban crownBOT
# tight spruce its been marked as closed - not planned though: Thanks for writing this up. I ch...

That closure is consistent with the evidence, frustrating as it is. The useful takeaway is: OpenClaw isn’t treating your Claude Max login as invalid; Anthropic is returning an Extra Usage billing response for the OpenClaw-shaped Claude CLI run, and OpenClaw is just backing off after that.

Your practical next moves are:

  1. Enable/check Anthropic Extra Usage on the Claude account/org, then re-run:
openclaw models auth login --provider anthropic --method cli --set-default
openclaw models status
  1. If you don’t want Extra Usage surprises, switch OpenClaw to Anthropic API-key auth:
openclaw onboard
# choose Anthropic API key
  1. If you want to keep investigating, the only thing likely to reopen the OpenClaw side is logs proving wrong credential/profile selection or a different upstream error than You're out of extra usage.
urban crownBOT
tight spruce
#

Lets keep investigating then because I need to get it fixed

urban crownBOT
# tight spruce Lets keep investigating then because I need to get it fixed

Okay, then the next useful investigation is to find the smallest difference between your working claude -p smoke test and OpenClaw’s actual Claude CLI backend call.

First, try this direct Claude command. It keeps the same local Claude login but adds the main OpenClaw-style flags:

printf 'Say ok
' | claude -p \
  --output-format stream-json \
  --include-partial-messages \
  --verbose \
  --setting-sources user \
  --allowedTools 'mcp__openclaw__*'

If that returns “out of extra usage”, we’ve proven it’s triggered by Claude CLI invocation shape, not OpenClaw auth/profile selection.

If it returns OK, try adding a tiny appended system prompt:

urban crownBOT
# tight spruce Lets keep investigating then because I need to get it fixed
printf 'Say ok
' | claude -p \
  --output-format stream-json \
  --include-partial-messages \
  --verbose \
  --setting-sources user \
  --allowedTools 'mcp__openclaw__*' \
  --append-system-prompt 'You are a helpful assistant.'

Please paste only:

  • whether each command succeeds or returns extra-usage
  • the first error line if it fails
  • no tokens/account details

If both direct commands work, then the next suspects are OpenClaw’s generated MCP config/plugin dir, session/resume state, or the full OpenClaw system prompt. That would give you stronger evidence than the original issue had.

tight spruce
#

It returned a large batch of text, not just "Ok" it returned details of plugins, hooks etc.

urban crownBOT
# tight spruce It returned a large batch of text, not just "Ok" it returned details of plugins,...

That’s expected with --output-format stream-json --verbose; Claude prints JSON/event records about plugins, hooks, session state, etc. The key question is: did it exit successfully, or did any event contain out of extra usage?

If there was no extra-usage error, that first test did not reproduce the failure. Next test the same shape but force Sonnet, since that’s what failed in OpenClaw:

printf 'Say ok
' | claude -p \
  --model sonnet \
  --output-format stream-json \
  --include-partial-messages \
  --verbose \
  --setting-sources user \
  --allowedTools 'mcp__openclaw__*'

If that also works, run the appended-system-prompt version too:

urban crownBOT
# tight spruce It returned a large batch of text, not just "Ok" it returned details of plugins,...
printf 'Say ok
' | claude -p \
  --model sonnet \
  --output-format stream-json \
  --include-partial-messages \
  --verbose \
  --setting-sources user \
  --allowedTools 'mcp__openclaw__*' \
  --append-system-prompt 'You are a helpful assistant.'

You don’t need to paste the big JSON. Just say:

  • command 1: succeeds / extra-usage
  • command 2: succeeds / extra-usage

If both succeed, then the trigger is likely one of the OpenClaw-generated pieces we haven’t reproduced yet: generated MCP config, generated Claude plugin dir, session/resume state, or the full OpenClaw system prompt.

tight spruce
#

command 1 and 2 both succeed and cant see anywhere that says out of extra usage

urban crownBOT
# tight spruce command 1 and 2 both succeed and cant see anywhere that says out of extra usage

Good, that narrows it. The common Claude flags and a tiny appended prompt work, so the next test is to temporarily make OpenClaw’s backend as small as possible.

This is diagnostic and reversible. First save current values:

openclaw config get agents.defaults.systemPromptOverride --json > /tmp/openclaw-systemPromptOverride.before.json 2>/dev/null || true
openclaw config get agents.defaults.cliBackends.claude-cli --json > /tmp/openclaw-claude-cli-backend.before.json 2>/dev/null || true

Then apply a minimal override:

openclaw config set agents.defaults.systemPromptOverride "You are a helpful assistant."
openclaw config set agents.defaults.cliBackends.claude-cli '{
  "command": "claude",
  "args": ["-p", "--output-format", "stream-json", "--include-partial-messages", "--verbose", "--setting-sources", "user"],
urban crownBOT
# tight spruce command 1 and 2 both succeed and cant see anywhere that says out of extra usage
  "resumeArgs": ["-p", "--output-format", "stream-json", "--include-partial-messages", "--verbose", "--setting-sources", "user", "--resume", "{sessionId}"],
  "output": "jsonl",
  "input": "stdin",
  "modelArg": "--model",
  "sessionMode": "none",
  "systemPromptWhen": "never",
  "serialize": true
}' --strict-json
openclaw config validate
openclaw gateway restart

Then clear the billing lockout and test one fresh OpenClaw turn:

urban crownBOT
# tight spruce command 1 and 2 both succeed and cant see anywhere that says out of extra usage
openclaw models auth login --provider anthropic --method cli --set-default
openclaw models status

Use a fresh OpenClaw session if you can, or send /reset before testing.

If this works, the trigger is probably in one of the removed pieces: full OpenClaw system prompt, allowed MCP tools, or session continuity. If it still fails, the trigger is likely the generated MCP/plugin overlay or some deeper OpenClaw-launched Claude environment difference.

To undo the diagnostic override afterward:

openclaw config unset agents.defaults.systemPromptOverride
openclaw config unset agents.defaults.cliBackends.claude-cli
openclaw gateway restart
urban crownBOT
tight spruce
#

NDoes it maybe have something to do with how I have claude code installed on the same server, authenticated via oauth?

urban crownBOT
# tight spruce NDoes it maybe have something to do with how I have claude code installed on the...

Yes, it could be related, but not in the sense of “two separate auths conflict.” OpenClaw’s Claude CLI auth path is specifically reusing the Claude Code/Claude CLI OAuth login on that server. So the relevant question is whether the gateway process sees the same Claude install, same HOME/state, and same account that your shell sees.

Quick checks:

which claude
claude --version
claude auth status --text
openclaw config get agents.defaults.cliBackends.claude-cli.command --json
openclaw gateway status

If OpenClaw is installed as a service, also check the service environment/user. A common failure mode is: your interactive shell runs one claude binary/account, but the gateway service runs under a different user, PATH, HOME, or Node/npm install path.

That said, your openclaw models status did show anthropic:claude-cli=OAuth, so OpenClaw is seeing some Claude CLI credential. We need to confirm it’s the exact same Claude Code OAuth state as the one where claude -p succeeds.

tight spruce
#

I did get this error: Config path not found: agents.defaults.cliBackends.claude-cli.command.

urban crownBOT
# tight spruce I did get this error: Config path not found: agents.defaults.cliBackends.claude-...

That error is okay. It just means you haven’t set a custom Claude CLI command path, so OpenClaw is using the bundled default command: claude resolved from the gateway process PATH.

That actually makes PATH/service-user checking more important.

Please run:

which claude
claude --version
openclaw gateway status
openclaw status --all

In the openclaw status --all output, look for anything showing the gateway/service user, service command, PATH/env warnings, or model/auth diagnostics. Redact tokens, emails, account IDs, and private paths before posting.

If the gateway is a systemd/launchd service and its PATH can’t find the same claude binary as your shell, set the absolute command path explicitly, for example:

urban crownBOT
tight spruce
#

What are you looking for specifically in the output of the command on the previous message?

urban crownBOT
# tight spruce What are you looking for specifically in the output of the command on the previo...

Specifically:

  1. From which claude / claude --version
  • the exact Claude binary path
  • confirm it’s Claude 2.1.142, same as the GitHub issue
  1. From openclaw gateway status
  • whether the gateway is running as a service/daemon
  • which command/path the service is using
  • any config path/state dir shown
  • whether it hints at a different Node/npm install path
  1. From openclaw status --all
  • model/auth section showing claude-cli / anthropic:claude-cli
  • any warnings about env, PATH, service mismatch, auth profile cooldowns, or config profile/state dir
  • log tail lines around the failed Claude CLI turn, especially the actual upstream error and any “command not found”, “permission”, “HOME”, “auth”, or “using profile” lines
urban crownBOT
tight spruce
#

Here is the which claude and version: /home/[REDACTED}/.local/bin/claude
2.1.142 (Claude Code)

urban crownBOT
# tight spruce Here is the which claude and version: /home/[REDACTED}/.local/bin/claude 2.1.142...

Good. That path is user-local, so it’s exactly the kind of thing a daemon/service might or might not see depending on its user and PATH.

Set OpenClaw to that exact binary path so we remove PATH ambiguity:

openclaw config set agents.defaults.cliBackends.claude-cli.command "/home/[YOUR_USER]/.local/bin/claude"
openclaw config validate
openclaw gateway restart

Use your real path, not the redacted one.

Then re-sync and test again:

openclaw models auth login --provider anthropic --method cli --set-default
urban crownBOT
tight spruce
#

Still flipped to billing. Here are the logs:

19:53:11+00:00 warn model-fallback/decision {"subsystem":"model-fallback/decision"} {"event":"model_fallback_decision","tags":["error_handling","model_fallback","probe_cooldown_candidate"],"runId":"798ab623-ccae-4ea0-87ed-997e21fc2b5f","sessionId":"[REDACTED]","lane":"main","decision":"probe_cooldown_candidate","requestedProvider":"anthropic","requestedModel":"claude-sonnet-4-6","candidateProvider":"anthropic","candidateModel":"claude-sonnet-4-6","attempt":1,"total":1,"reason":"billing","isPrimary":true,"requestedModelMatched":true,"fallbackConfigured":false,"allowTransientCooldownProbe":true,"profileCount":1} model fallback decision
19:53:11+00:00 warn agent/embedded {"subsystem":"agent/embedded"} probing cooldowned auth profile for anthropic/claude-sonnet-4-6 due to billing unavailability

warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"798ab623-ccae-4ea0-87ed-997e21fc2b5f","isError":true,"error":"LLM request rejected: You're out of extra usage. Add more at claude.ai/settings/usage and keep going.","failoverReason":"billing","model":"claude-sonnet-4-6","provider":"anthropic","rawErrorPreview":"{"type":"error","error":{"type":"invalid_request_error","message":"You're out of extra usage. Add more at claude.ai/settings/usage and keep going."},"request_id":"sha256:00238a98899a"}","rawErrorHash":"sha256:ca473af0201f","rawErrorFingerprint":"sha256:6f0c10a1c1ff","providerRuntimeFailureKind":"unclassified","providerErrorType":"invalid_request_error","providerErrorMessagePreview":"You're out of extra usage. Add more at claude.ai/settings/usage and keep going.","requestIdHash":"sha256:00238a98899a"} embedded run agent end

urban crownBOT
# tight spruce Still flipped to billing. Here are the logs: 19:53:11+00:00 warn model-fallback...

Those logs show something important: the failing run is still going through provider anthropic with model claude-sonnet-4-6, not provider claude-cli.

So pinning the Claude binary path didn’t matter because this does not look like the CLI backend path in that log. It looks like OpenClaw is using the Anthropic provider path with the anthropic:claude-cli OAuth profile, which would explain why it hits Anthropic’s extra-usage API response.

Try one fresh session/message explicitly selecting the Claude CLI provider model, not the Anthropic provider model:

/model claude-cli/claude-sonnet-4-6

Then send a tiny test like “say ok”.

If that model id is not accepted, run:

openclaw models list --provider claude-cli
urban crownBOT
tight spruce
#

I get this when trying to set the model: model set failed: GatewayClientRequestError: model not allowed: claude-cli/claude-sonnet-4-6

urban crownBOT
# tight spruce I get this when trying to set the model: model set failed: GatewayClientRequestE...

That means your model allowlist still doesn’t include the Claude CLI model. That also explains why the run stayed on anthropic/claude-sonnet-4-6 and kept hitting the extra-usage path.

Add the Claude CLI models to the allowlist, then set the primary model to the CLI backend:

openclaw config set agents.defaults.models '{
  "claude-cli/claude-sonnet-4-6": { "alias": "sonnet-cli" },
  "claude-cli/claude-opus-4-6": { "alias": "opus-cli" },
  "claude-cli/claude-haiku-4-5": { "alias": "haiku-cli" }
}' --strict-json --merge

openclaw config set agents.defaults.model '{"primary":"claude-cli/claude-sonnet-4-6"}' --strict-json
openclaw config validate
openclaw gateway restart

Then check:

urban crownBOT
# tight spruce I get this when trying to set the model: model set failed: GatewayClientRequestE...
openclaw models status --plain
openclaw models status --json | jq '.defaultModel, .model, .auth.providers[]? | select(.provider=="claude-cli" or .provider=="anthropic")'

Now try a fresh session/message again. The logs should say requestedProvider: "claude-cli". If they still say requestedProvider: "anthropic", then some per-session override is pinned; use /reset or start a new session/thread before testing.

tight spruce
#

I dont have jq installed

urban crownBOT
# tight spruce I dont have jq installed

No problem. Use the plain output:

openclaw models status --plain
openclaw models list --provider claude-cli --plain
openclaw models list --plain | grep 'claude-cli/'

If grep also isn’t available, just run:

openclaw models list --provider claude-cli
openclaw models status

The key things to confirm are:

  • claude-cli/claude-sonnet-4-6 appears in the allowed/configured model list
urban crownBOT
tight spruce
#

I see this now: openclaw models status --plain
openclaw models list --provider claude-cli --plain
openclaw models list --plain | grep 'claude-cli/'

🦞 OpenClaw 2026.5.12 (f066dd2) — Powered by open source, sustained by spite and good documentation.

claude-cli/claude-sonnet-4-6

🦞 OpenClaw 2026.5.12 (f066dd2) — Hot reload for config, cold sweat for deploys.

claude-cli/claude-sonnet-4-6
claude-cli/claude-opus-4-6
claude-cli/claude-haiku-4-5
claude-cli/claude-sonnet-4-6
claude-cli/claude-opus-4-6
claude-cli/claude-haiku-4-5

urban crownBOT
urban crownBOT
tight spruce
#

The default model still says anthropic/claude-sonnet-4-6 should I explictly try and set the cli model again?

urban crownBOT
# tight spruce The default model still says anthropic/claude-sonnet-4-6 should I explictly try ...

Yes. The allowlist is fixed, but the default/active model is still pinned to the Anthropic provider.

Set it explicitly:

openclaw models set claude-cli/claude-sonnet-4-6
openclaw models status --plain

If that command fails, use config directly:

openclaw config set agents.defaults.model '{"primary":"claude-cli/claude-sonnet-4-6"}' --strict-json
openclaw config validate
openclaw gateway restart
openclaw models status --plain
urban crownBOT
tight spruce
#

It does print that, but when I am in the openclaw tui. The model selected says anthropic/claude-sonnet-4-6 but now I can specifically set it by using /model claude-cli/claude-sonnet-4-6 and it doesn't give me a gateway error.

urban crownBOT
# tight spruce It does print that, but when I am in the openclaw tui. The model selected says a...

Good, then the allowlist/default config is now mostly fixed, but the existing TUI session likely has a per-session model override still pinned to anthropic/claude-sonnet-4-6.

In the TUI, do:

/model claude-cli/claude-sonnet-4-6
/reset
say ok

If /reset resets the model back to Anthropic, start a brand-new TUI session after the config change instead. Existing sessions can keep old model/session state even after the default changes.

If it works after explicit /model claude-cli/..., the remaining cleanup is just clearing the old session override. The important part is that /model claude-cli/claude-sonnet-4-6 is now accepted, which it wasn’t before.

tight spruce
#

When i hit reset it didnt go back to anthropic and when i typed say ok it responded so it seems ro be working. I jsut want to tidy up the available models now, how do i do this?

urban crownBOT
# tight spruce When i hit reset it didnt go back to anthropic and when i typed say ok it respon...

Nice, that means we found it: the working path is claude-cli/..., and the old anthropic/... model was what kept hitting extra-usage.

To tidy the available model list, replace agents.defaults.models with only the models you actually want shown/allowed. Back it up first:

openclaw config get agents.defaults.models --json > ~/openclaw-models.before.json

Example: keep only Claude CLI models:

openclaw config set agents.defaults.models '{
  "claude-cli/claude-sonnet-4-6": { "alias": "sonnet" },
  "claude-cli/claude-opus-4-6": { "alias": "opus" },
  "claude-cli/claude-haiku-4-5": { "alias": "haiku" }
}' --strict-json --replace
urban crownBOT
# tight spruce When i hit reset it didnt go back to anthropic and when i typed say ok it respon...

openclaw config set agents.defaults.model '{
  "primary": "claude-cli/claude-sonnet-4-6",
  "fallbacks": ["claude-cli/claude-haiku-4-5"]
}' --strict-json

openclaw config validate
openclaw gateway restart
openclaw models list --plain
openclaw models status --plain

If you also want to keep OpenAI Codex or another provider in the picker, add those provider/model entries into the same JSON before running --replace. --replace is the important bit: it removes the old anthropic/claude-sonnet-4-6 allowlist entry instead of just merging more models in.

Docs: https://docs.openclaw.ai/concepts/models

urban crownBOT
tight spruce
#

Now I have lots of configured models like anthropic/claude-sonnet-4-6 which I want to remove so I dont accidentally remove them again. How do i do this?

urban crownBOT
# tight spruce Now I have lots of configured models like anthropic/claude-sonnet-4-6 which I wa...

Use config set ... --replace on agents.defaults.models. That is the allowlist/picker list. First back it up:

openclaw config get agents.defaults.models --json > ~/openclaw-models.before.json
openclaw config get agents.defaults.model --json > ~/openclaw-default-model.before.json

Then replace the model allowlist with only the Claude CLI entries you want:

openclaw config set agents.defaults.models '{
  "claude-cli/claude-sonnet-4-6": { "alias": "sonnet" },
  "claude-cli/claude-opus-4-6": { "alias": "opus" },
  "claude-cli/claude-haiku-4-5": { "alias": "haiku" }
}' --strict-json --replace
urban crownBOT
# tight spruce Now I have lots of configured models like anthropic/claude-sonnet-4-6 which I wa...
openclaw config set agents.defaults.model '{
  "primary": "claude-cli/claude-sonnet-4-6",
  "fallbacks": ["claude-cli/claude-haiku-4-5"]
}' --strict-json

openclaw config validate
openclaw gateway restart
openclaw models list --plain
openclaw models status --plain

After that, anthropic/claude-sonnet-4-6 should no longer be selectable from the configured model list.

Important distinction: this removes the configured model entries. It does not necessarily delete old auth profiles from auth-profiles.json, which is fine. The thing that caused the problem was selecting anthropic/... instead of claude-cli/....

tight spruce
#

Is there a command so i can do this interactively?

urban crownBOT
# tight spruce Is there a command so i can do this interactively?

For removing configured model entries, I don’t see an interactive “prune/remove models from allowlist” command. The interactive /models picker can list/select, and /models add can add, but cleanup/removal is still a config edit.

Closest interactive-ish options:

  1. Use the Dashboard / Control UI config editor, if you have it open, and edit:
agents.defaults.models
agents.defaults.model
  1. Use the guided config command:
openclaw config

or

urban crownBOT
# tight spruce Is there a command so i can do this interactively?
openclaw configure --section model

But for this specific “remove the Anthropic entries so I can’t pick them by accident” job, the safest/clearest path is still the explicit replace command I sent. It overwrites only the model allowlist with the three claude-cli/... entries.

You can preview first with:

openclaw config set agents.defaults.models '{
  "claude-cli/claude-sonnet-4-6": { "alias": "sonnet" },
  "claude-cli/claude-opus-4-6": { "alias": "opus" },
  "claude-cli/claude-haiku-4-5": { "alias": "haiku" }
}' --strict-json --replace --dry-run

If the dry run looks right, run the same command without --dry-run.

tight spruce
#

I still have all these though?:

Configured models (9): claude-cli/claude-sonnet-4-6, claude-cli/claude-haiku-4-5, claude-cli/claude-opus-4-7, anthropic/claude-opus-4-7, anthropic/claude-sonnet-4-6, anthropic/claude-opus-4-6, anthropic/claude-opus-4-5, anthropic/claude-sonnet-4-5, anthropic/claude-haiku-4-5

urban crownBOT
# tight spruce I still have all these though?: Configured models (9): claude-cli/claude-sonnet...

That means the replace either wasn’t applied, was run as --dry-run, or you used --merge somewhere. --merge only adds entries; it will never remove the old anthropic/... ones.

Run this exact command without --dry-run:

openclaw config set agents.defaults.models '{
  "claude-cli/claude-sonnet-4-6": { "alias": "sonnet" },
  "claude-cli/claude-opus-4-7": { "alias": "opus" },
  "claude-cli/claude-haiku-4-5": { "alias": "haiku" }
}' --strict-json --replace

openclaw config set agents.defaults.model '{
  "primary": "claude-cli/claude-sonnet-4-6",
  "fallbacks": ["claude-cli/claude-haiku-4-5"]
}' --strict-json
urban crownBOT
# tight spruce I still have all these though?: Configured models (9): claude-cli/claude-sonnet...
openclaw config validate
openclaw gateway restart

Then verify the actual config, not just the TUI display:

openclaw config get agents.defaults.models --json
openclaw models list --plain
openclaw models status --plain

If config get agents.defaults.models --json still shows anthropic/..., paste the command output/error from the config set ... --replace command. If config is clean but the TUI still shows old models, close and reopen the TUI or start a new session; the old picker/session may be showing cached state.

tight spruce
#

There isn't an error it runs successfully, but they are still there when i go and check.

urban crownBOT
# tight spruce There isn't an error it runs successfully, but they are still there when i go an...

If the command succeeds but Configured models still shows Anthropic, we need to separate two cases:

  1. The active config still contains Anthropic entries.
  2. You edited one config file, but the gateway/TUI is reading another one.

Run these and compare:

openclaw config file
openclaw config get agents.defaults.models --json
openclaw models status
openclaw gateway status

In config get agents.defaults.models --json, if you still see anthropic/..., the replace did not actually change that active config path. In that case paste the exact config set ... --replace command output.

If config get agents.defaults.models --json shows only claude-cli/... but models status still says 9 configured models, then you likely have a config/profile mismatch: CLI writes one openclaw.json, but the running gateway/TUI is using another config/state dir. openclaw config file and openclaw gateway status should expose that.

urban crownBOT
tight spruce
#

I just did that by accident, I can see that the claude-cli models are still in the configured models list, but it looks like the aliases for sonnet and opus have been reverted to the anthropic versions: Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : claude-cli/claude-opus-4-7
Fallbacks (1) : claude-cli/claude-sonnet-4-6
Image model : -
Image fallbacks (0): -
Aliases (3) : sonnet -> anthropic/claude-sonnet-4-6, haiku -> claude-cli/claude-haiku-4-5, opus -> anthropic/claude-opus-4-7
Configured models (9): claude-cli/claude-sonnet-4-6, claude-cli/claude-haiku-4-5, claude-cli/claude-opus-4-7, anthropic/claude-opus-4-7, anthropic/claude-sonnet-4-6, anthropic/claude-opus-4-6, anthropic/claude-opus-4-5, anthropic/claude-sonnet-4-5, anthropic/claude-haiku-4-5

urban crownBOT
# tight spruce I just did that by accident, I can see that the claude-cli models are still in t...

No harm done. That confirms the auth migration re-seeded the Anthropic entries and aliases. Just don’t run that auth-login command again while cleaning.

Now replace the allowlist again, but include the opus-4-7 model since your default is using it:

openclaw config set agents.defaults.models '{
  "claude-cli/claude-opus-4-7": { "alias": "opus" },
  "claude-cli/claude-sonnet-4-6": { "alias": "sonnet" },
  "claude-cli/claude-haiku-4-5": { "alias": "haiku" }
}' --strict-json --replace

openclaw config set agents.defaults.model '{
  "primary": "claude-cli/claude-opus-4-7",
  "fallbacks": ["claude-cli/claude-sonnet-4-6"]
}' --strict-json
urban crownBOT
# tight spruce I just did that by accident, I can see that the claude-cli models are still in t...
openclaw config validate
openclaw gateway restart
openclaw models status

Expected after that:

Default       : claude-cli/claude-opus-4-7
Fallbacks    : claude-cli/claude-sonnet-4-6
Aliases      : sonnet -> claude-cli/claude-sonnet-4-6, haiku -> claude-cli/claude-haiku-4-5, opus -> claude-cli/claude-opus-4-7
Configured models (3): claude-cli/claude-opus-4-7, claude-cli/claude-sonnet-4-6, claude-cli/claude-haiku-4-5

If it shows that, you’re cleaned up. If you need to re-auth later, expect it may re-seed Anthropic entries again; then repeat this cleanup.

tight spruce
#

Nope, it didnt update the aliases:

Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : claude-cli/claude-opus-4-7
Fallbacks (1) : claude-cli/claude-sonnet-4-6
Image model : -
Image fallbacks (0): -
Aliases (3) : sonnet -> anthropic/claude-sonnet-4-6, haiku -> claude-cli/claude-haiku-4-5, opus -> anthropic/claude-opus-4-7
Configured models (9): claude-cli/claude-sonnet-4-6, claude-cli/claude-haiku-4-5, claude-cli/claude-opus-4-7, anthropic/claude-opus-4-7, anthropic/claude-sonnet-4-6, anthropic/claude-opus-4-6, anthropic/claude-opus-4-5, anthropic/claude-sonnet-4-5, anthropic/claude-haiku-4-5

urban crownBOT
# tight spruce Nope, it didnt update the aliases: Config : ~/.openclaw/openclaw.json A...

Okay, then handle it surgically instead of relying on whole-object replace.

First fix the aliases using the dedicated alias commands:

openclaw models aliases remove sonnet
openclaw models aliases remove opus
openclaw models aliases add sonnet claude-cli/claude-sonnet-4-6
openclaw models aliases add opus claude-cli/claude-opus-4-7

Then remove the Anthropic configured model entries one by one with bracket notation:

openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-7"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-sonnet-4-6"]'
urban crownBOT
# tight spruce Nope, it didnt update the aliases: Config : ~/.openclaw/openclaw.json A...
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-6"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-5"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-sonnet-4-5"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-haiku-4-5"]'

Then:

openclaw config validate
openclaw gateway restart
openclaw models status

Expected:

  • sonnet -> claude-cli/claude-sonnet-4-6
urban crownBOT
tight spruce
#

The aliases still havent updated. Can we try creating a new alias called 'Sonnet 4-6' for the claude cli just to test if this works instead?

urban crownBOT
# tight spruce The aliases still havent updated. Can we try creating a new alias called 'Sonnet...

Yes, but aliases are normalized pretty strictly, so use a simple token without spaces. Try:

openclaw models aliases add sonnet-cli claude-cli/claude-sonnet-4-6
openclaw models aliases list
openclaw models status

Then in TUI try:

/model sonnet-cli

If that works, the alias mechanism is fine and the issue is specifically that the built-in/simple sonnet alias is colliding with the older Anthropic entry still present somewhere.

If you really want a display-ish name, try hyphens rather than spaces:

urban crownBOT
tight spruce
#

Now how do i remove aliases

urban crownBOT
# tight spruce Now how do i remove aliases

Use:

openclaw models aliases list
openclaw models aliases remove sonnet-cli

For the old ones:

openclaw models aliases remove sonnet
openclaw models aliases remove opus

If remove says Alias not found, it’s already gone from the config that command is editing.

Then verify:

urban crownBOT
# tight spruce Now how do i remove aliases
openclaw models aliases list
openclaw models status

If models aliases list says one thing but models status still shows stale aliases, then the status command is likely reading a different active config/source or cached gateway state; restart gateway and TUI after the alias removals.

tight spruce
#

Why does models aliases list show a different list to models status:

Daffydd@srv1670241:~$ openclaw models aliases list

🦞 OpenClaw 2026.5.12 (f066dd2) — Shell yeah—I'm here to pinch the toil and leave you the glory.

Aliases (2):

  • sonnet-4-6-cli -> claude-cli/claude-sonnet-4-6
  • haiku -> claude-cli/claude-haiku-4-5

openclaw models status

🦞 OpenClaw 2026.5.12 (f066dd2) — Self-hosted, self-updating, self-aware (just kidding... unless?).

Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : claude-cli/claude-opus-4-7
Fallbacks (1) : claude-cli/claude-sonnet-4-6
Image model : -
Image fallbacks (0): -
Aliases (4) : sonnet-4-6-cli -> claude-cli/claude-sonnet-4-6, haiku -> claude-cli/claude-haiku-4-5, opus -> anthropic/claude-opus-4-7, sonnet -> anthropic/claude-sonnet-4-6

urban crownBOT
# tight spruce Why does models aliases list show a different list to models status: Daffydd@sr...

That mismatch likely means the two commands are not showing the same layer:

  • models aliases list is showing the aliases currently in your editable model config.
  • models status is showing the resolved/runtime model view, and something is still injecting or preserving the Anthropic entries there.

The source of truth for what you actually edited is:

openclaw config get agents.defaults.models --json

If that shows only claude-cli/..., then your file cleanup worked and models status is being polluted by a runtime/default/migration layer. In that case, restart both gateway and TUI:

openclaw gateway restart
# fully quit and reopen the TUI
urban crownBOT
# tight spruce Why does models aliases list show a different list to models status: Daffydd@sr...

Then check again.

If config get agents.defaults.models --json still contains anthropic/..., remove those exact entries from the source config:

openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-7"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-sonnet-4-6"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-6"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-5"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-sonnet-4-5"]'
openclaw config unset 'agents.defaults.models["anthropic/claude-haiku-4-5"]'

Given aliases list and status disagree, I’d call that an OpenClaw UX/config-resolution bug or at least confusing behavior. The key safety check is: if /model sonnet-4-6-cli selects claude-cli/... and your default is claude-cli/..., you’re on the working path.

tight spruce
#

Nope its fine, it matches the alias list so the models status is just a visual snag. Can you give me the commands to set the aliases for each of the claude cli models. One for sonnet, haiku and opus pls

urban crownBOT
# tight spruce Nope its fine, it matches the alias list so the models status is just a visual s...

Yep. Use these:

openclaw models aliases add sonnet claude-cli/claude-sonnet-4-6
openclaw models aliases add haiku claude-cli/claude-haiku-4-5
openclaw models aliases add opus claude-cli/claude-opus-4-7

If any alias already points somewhere else, remove it first, then add it again:

openclaw models aliases remove sonnet
openclaw models aliases remove haiku
openclaw models aliases remove opus

openclaw models aliases add sonnet claude-cli/claude-sonnet-4-6
urban crownBOT
tight spruce
#

So the aliases all look right, but the models status is still incorrect. It still only displays haiku as the only model with the claude-cli. This is the only model that works when I message "say ok"

urban crownBOT
# tight spruce So the aliases all look right, but the models status is still incorrect. It stil...

That means there are still duplicate alias entries in the resolved model set. models status is probably seeing both:

claude-cli/claude-sonnet-4-6 alias=sonnet
anthropic/claude-sonnet-4-6 alias=sonnet

and the Anthropic one is winning in the status display/model selection. Haiku works because it’s the only alias that isn’t colliding.

Remove the alias fields from the Anthropic entries directly:

openclaw config unset 'agents.defaults.models["anthropic/claude-sonnet-4-6"].alias'
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-7"].alias'
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-6"].alias'
openclaw config unset 'agents.defaults.models["anthropic/claude-opus-4-5"].alias'
urban crownBOT
urban crownBOT
urban crownBOT
tight spruce
#

I just get this: Config path not found: agents.defaults.models["anthropic/claude-sonnet-4-6"].alias. Nothing was changed. Run openclaw config get <path> first if you are unsure of the path.

urban crownBOT
# tight spruce I just get this: Config path not found: agents.defaults.models["anthropic/claude...

That error means those Anthropic alias fields are not in your editable config anymore. So the stale sonnet -> anthropic/... / opus -> anthropic/... entries are coming from the resolved/runtime status layer, not from a path you can unset directly.

At this point I’d stop trying to reuse the built-in sonnet / opus names. They’re colliding with runtime Anthropic defaults. Use unique aliases instead:

openclaw models aliases remove sonnet || true
openclaw models aliases remove opus || true
openclaw models aliases remove sonnet-cli || true
openclaw models aliases remove opus-cli || true
openclaw models aliases remove haiku-cli || true

openclaw models aliases add sonnet-cli claude-cli/claude-sonnet-4-6
openclaw models aliases add opus-cli claude-cli/claude-opus-4-7
openclaw models aliases add haiku-cli claude-cli/claude-haiku-4-5

openclaw models aliases list
urban crownBOT
urban crownBOT
tight spruce
#

Whats the command that will reset the cooldown period again?

urban crownBOT
# tight spruce Whats the command that will reset the cooldown period again?

Supported way is to re-run the auth login; OpenClaw clears stale cooldown/disabled state during that flow:

openclaw models auth login --provider anthropic --method cli --set-default

Then restart/check:

openclaw gateway restart
openclaw models status

Important: this may re-seed the Anthropic model entries/aliases again, because it runs the Claude CLI migration. So after clearing the cooldown, set back to the CLI model if needed:

urban crownBOT
tight spruce
#

YEs but its still saying that the cli auth is in suspended billing: Embedded agent failed before reply: All models failed (2): claude-cli/claude-opus-4-7: Provider claude-cli is in cooldown (suspending lanes) (billing) | claude-cli/claude-sonnet-4-6: Provider claude-cli is in cooldown (suspending lanes) (billing)

urban crownBOT
# tight spruce YEs but its still saying that the cli auth is in suspended billing: Embedded age...

Got it. That cooldown is in the auth-profile usage state, and the normal re-auth path is not clearing the claude-cli runtime cooldown in your case.

Do this carefully: backup first, then remove only the cooldown stats for the Claude CLI profile.

AUTH="$HOME/.openclaw/agents/main/agent/auth-profiles.json"
cp "$AUTH" "$AUTH.$(date +%Y%m%d-%H%M%S).bak"

node -e '
const fs = require("fs");
const p = process.argv[1];
const j = JSON.parse(fs.readFileSync(p, "utf8"));
for (const id of ["anthropic:claude-cli", "claude-cli:default", "claude-cli"]) {
  if (j.usageStats && j.usageStats[id]) delete j.usageStats[id];
}
if (j.usageStats && Object.keys(j.usageStats).length === 0) delete j.usageStats;
urban crownBOT
# tight spruce YEs but its still saying that the cli auth is in suspended billing: Embedded age...
fs.writeFileSync(p, JSON.stringify(j, null, 2) + "
");
' "$AUTH"

openclaw gateway restart
openclaw models status

Then test using the explicit CLI backend model or your non-colliding alias:

/model sonnet-cli
say ok

Important: this only clears the local cooldown. If you accidentally run anthropic/... again, or a stale alias routes to Anthropic, it can immediately recreate the billing cooldown.

tight spruce
#

Yes but if I run this again to reset the cooldown: openclaw models auth login --provider anthropic --method cli --set-default

And then ensure that I set the correct model before use, then it wont trigger the cooldown right?

urban crownBOT
# tight spruce Yes but if I run this again to reset the cooldown: openclaw models auth login --...

Mostly yes, with one caveat.

That command should clear stale auth-profile cooldown state and re-sync Claude CLI auth, but it may also re-seed the generic Anthropic entries/aliases again. So the safe sequence is:

openclaw models auth login --provider anthropic --method cli --set-default
openclaw models set claude-cli/claude-sonnet-4-6
openclaw gateway restart
openclaw models status --plain

Then in TUI, before testing:

/model claude-cli/claude-sonnet-4-6
say ok
urban crownBOT
tight spruce
#

Now lets set the fallback to sonnet 4.6 and try and update the aliases to the right models

urban crownBOT
# tight spruce Now lets set the fallback to sonnet 4.6 and try and update the aliases to the ri...

Do this in one pass:

openclaw config set agents.defaults.model '{
  "primary": "claude-cli/claude-opus-4-7",
  "fallbacks": ["claude-cli/claude-sonnet-4-6"]
}' --strict-json

openclaw models aliases remove sonnet || true
openclaw models aliases remove opus || true
openclaw models aliases remove haiku || true
openclaw models aliases remove sonnet-cli || true
openclaw models aliases remove opus-cli || true
openclaw models aliases remove haiku-cli || true

openclaw models aliases add sonnet-cli claude-cli/claude-sonnet-4-6
urban crownBOT
# tight spruce Now lets set the fallback to sonnet 4.6 and try and update the aliases to the ri...
openclaw models aliases add opus-cli claude-cli/claude-opus-4-7
openclaw models aliases add haiku-cli claude-cli/claude-haiku-4-5

openclaw config validate
openclaw gateway restart
openclaw models aliases list
openclaw models status --plain

I’d use sonnet-cli, opus-cli, and haiku-cli rather than plain sonnet / opus for now because those generic names have been colliding with the runtime Anthropic entries. Once this is stable, you can decide whether it’s worth trying to reclaim the short aliases.

tight spruce
#

Now whats the command to remove all the anthropic/claude models from the configured models list?