openclaw - 💡(How to fix) Fix doctor --fix silently strips agentRuntime: claude-cli mapping in 2026.5.18 — breaks MAX OAuth [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#84054Fetched 2026-05-20 03:44:40
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
1
Timeline (top)
labeled ×3closed ×1commented ×1cross-referenced ×1

Error Message

Severity: Critical — silently breaks Claude MAX OAuth routing, falls back to direct-API with the OAuth token (rejected by Anthropic with misleading "billing" error)

  1. JARVIS (and other Claude MAX-OAuth-using agents) starts failing with what looks like a billing/quota error
  • The error surface (Anthropic "billing" error) hides the actual config issue — users will assume their MAX plan was wrong, not their config
  1. The Anthropic "billing" error path should log diagnostic info about which path was taken (direct-API vs claude-cli subprocess) so users can self-diagnose

Root Cause

After running openclaw doctor --fix:

  1. JARVIS (and other Claude MAX-OAuth-using agents) starts failing with what looks like a billing/quota error
  2. Logs reveal Anthropic is rejecting calls because the request is going down the direct-API path with an OAuth token (which MAX rejects with "extra usage" / "billing" style errors)
  3. The cause: doctor --fix removed agentRuntime: claude-cli from per-model runtime mappings in defaults.models
  4. A persistent billing-cooldown in auth-state.json (5hr disable that survives restarts) compounds the problem until manually cleared

Fix Action

Fix / Workaround

Root cause (per Claude Code's 2026-05-18 patch)

Workaround required to restore working state:

  1. Re-add { "agentRuntime": { "id": "claude-cli" } } to each anthropic/* model entry in defaults.models
  2. Clear the persistent billing cooldown in auth-state.json (manual edit)
  3. Restart Gateway to flush in-memory provider cooldown

Trivial — openclaw doctor --fix on a 2026.5.18 install with MAX OAuth configured will reproduce. The diagnosis + patch above was performed by Anthropic's Claude Code on 2026-05-18.

RAW_BUFFERClick to expand / collapse

openclaw doctor --fix silently strips agentRuntime: claude-cli runtime mapping in 2026.5.18

OpenClaw version: 2026.5.18 (50a2481) Severity: Critical — silently breaks Claude MAX OAuth routing, falls back to direct-API with the OAuth token (rejected by Anthropic with misleading "billing" error)

Symptoms

After running openclaw doctor --fix:

  1. JARVIS (and other Claude MAX-OAuth-using agents) starts failing with what looks like a billing/quota error
  2. Logs reveal Anthropic is rejecting calls because the request is going down the direct-API path with an OAuth token (which MAX rejects with "extra usage" / "billing" style errors)
  3. The cause: doctor --fix removed agentRuntime: claude-cli from per-model runtime mappings in defaults.models
  4. A persistent billing-cooldown in auth-state.json (5hr disable that survives restarts) compounds the problem until manually cleared

Root cause (per Claude Code's 2026-05-18 patch)

In 2026.5.18, the runtime resolver only reads per-model runtime mappings in defaults.models. Adding agentRuntime: claude-cli ONLY at the agent level is insufficient — doctor --fix strips it from the agent and the per-model mapping is required.

Workaround required to restore working state:

  1. Re-add { "agentRuntime": { "id": "claude-cli" } } to each anthropic/* model entry in defaults.models
  2. Clear the persistent billing cooldown in auth-state.json (manual edit)
  3. Restart Gateway to flush in-memory provider cooldown

Why this needs upstream fix

  • doctor --fix is presented as a safe normalization tool. Silently breaking MAX OAuth routing is the opposite of safe.
  • The error surface (Anthropic "billing" error) hides the actual config issue — users will assume their MAX plan was wrong, not their config
  • The 5hr persistent cooldown means the symptom outlives the user noticing and investigating

Suggested fixes

  1. doctor --fix should NEVER strip runtime mappings — at minimum, preserve agentRuntime blocks if present
  2. If the resolver has changed to require per-model runtime mappings, doctor should ADD them (not remove them) when it sees agent-level agentRuntime
  3. Billing cooldown should be discoverable + clearable via a doctor command (e.g. openclaw doctor --clear-cooldown) so users don't need to hand-edit auth-state.json
  4. The Anthropic "billing" error path should log diagnostic info about which path was taken (direct-API vs claude-cli subprocess) so users can self-diagnose

Related issue

The subagent silent crashes filed in #84053 may share root cause — if subagents are also affected by stripped runtime mappings, the streaming/socket behavior could be the surface symptom.

Reproducibility

Trivial — openclaw doctor --fix on a 2026.5.18 install with MAX OAuth configured will reproduce. The diagnosis + patch above was performed by Anthropic's Claude Code on 2026-05-18.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING