Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When agentRuntime: claude-cli is set at agents.defaults, subagents silently ignore it, fall back to direct HTTP, and drain your Extra Usage quota instead of your Claude Max/Pro subscription — one failed call locks out the entire Anthropic provider for 24 hours.
Steps to reproduce
- Set
agents.defaults.agentRuntime.id = "claude-cli" in openclaw.json
- Leave
agents.defaults.subagents.agentRuntime unset
- Trigger any session that spawns a subagent (cron job with
kind: agentTurn, or any task calling sessions_spawn)
- Observe the subagent fires via
subsystem: agent/embedded instead of /usr/bin/claude
- If Extra Usage is disabled or exhausted, the embedded call returns 400 and OpenClaw writes
disabledUntil ~24h forward to auth-state.json
- All subsequent requests — including normal interactive chat — return
"Provider anthropic has billing issue (skipping all models)"
Expected behavior
Subagents inherit agentRuntime: claude-cli from agents.defaults and route through the /usr/bin/claude binary, which carries the correct Claude Code headers that bill against the Max/Pro subscription.
Actual behavior
Subagents use the embedded HTTP runner regardless of agents.defaults.agentRuntime. The embedded runner calls the Anthropic API directly without CLI headers, routing to the Extra Usage bucket. One billing error sets disabledUntil in auth-state.json, which survives gateway restarts. All provider models are then skipped with "Provider anthropic has billing issue (skipping all models)" until the cooldown expires or the file is manually cleared.
OpenClaw version
2026.2.21-2
Operating system
Ubuntu 24.04 LTS (Linux 6.8.0-100-generic x86_64)
Install method
npm install -g openclaw
Model
anthropic/claude-sonnet-4-6
Provider / routing chain
- Intended:
anthropic:claude-cli OAuth → /usr/bin/claude binary - Actual (subagents): embedded HTTP runner → api.anthropic.com directly (no CLI headers)
Additional provider/model setup details
Single auth profile anthropic:claude-cli (OAuth). No anthropic:manual profile.
agents.defaults.agentRuntime.id = "claude-cli" is set.
agents.defaults.subagents.agentRuntime is absent.
The diagnostic tool flags this post-hoc under automated diagnosis but emits no warning at gateway startup. The lockout state is stored under usageStats["anthropic:claude-cli"] in:
Logs, screenshots, and evidence
and persists across restarts.
## Logs and Evidence
Diagnostic report (tokens redacted by diagnostic script). Key evidence:
- **Section 2** — `disabledUntil` set, `disabledReason: billing`
- **Section 6** — first error at `00:07:04 UTC` from `subsystem: agent/embedded`:
Impact and severity
Impact and Severity
|
|
| Affected users |
Any Claude Max/Pro user running claude-cli OAuth with subagents — standard self-hosted setup |
| Severity |
Blocks entire agent workflow — not just subagents, all interactive chat stops |
| Frequency |
Reproducible every time a subagent is spawned with Extra Usage disabled or exhausted; also triggered on gateway restart when a missed cron fires catch-up |
| Consequence |
Up to 24h outage requiring manual intervention; no warning before or during failure; subscription usage console shows nothing wrong because the subscription is never actually reached |
Workaround
Manually clear usageStats fields in auth-state.json and restart:
python3 -c "
import json
path = '/home/<user>/.openclaw/agents/main/agent/auth-state.json'
with open(path) as f: d = json.load(f)
for p in d.get('usageStats', {}):
for k in ['disabledUntil','failureCounts','errorCount','disabledReason','lastFailureAt']:
d['usageStats'][p].pop(k, None)
with open(path, 'w') as f: json.dump(d, f, indent=2)
print('Cleared.')
"
openclaw gateway restart
Permanent fix: explicitly set agents.defaults.subagents.agentRuntime.id = "claude-cli" in openclaw.json.
Additional Information
The diagnostic tool detects the misconfiguration but only when run manually. A gateway startup warning — analogous to the existing allowInsecureAuth=true warning — would catch this before it causes an outage.
Additional information
Suggested Fix
Two changes, one behavioral and one UX:
1. Default inheritance (the real fix)
When agents.defaults.agentRuntime.id is set, subagents.agentRuntime should
automatically inherit it unless explicitly overridden. Same logic as any sane
config cascade — child inherits parent unless told otherwise.
2. Startup warning (the safety net)
When agentRuntime.id = "claude-cli" is detected at agents.defaults but
subagents.agentRuntime is unset, emit a startup warning — same pattern already
used for allowInsecureAuth=true. Catches misconfiguration before it causes a
24h outage.
Note: We are not asking to remove the embedded HTTP runner — it is a
legitimate option for isolation use cases. The problem is the silent fallback,
not the existence of the path.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When agentRuntime: claude-cli is set at agents.defaults, subagents silently ignore it, fall back to direct HTTP, and drain your Extra Usage quota instead of your Claude Max/Pro subscription — one failed call locks out the entire Anthropic provider for 24 hours.
Steps to reproduce
agents.defaults.agentRuntime.id = "claude-cli"inopenclaw.jsonagents.defaults.subagents.agentRuntimeunsetkind: agentTurn, or any task callingsessions_spawn)subsystem: agent/embeddedinstead of/usr/bin/claudedisabledUntil~24h forward toauth-state.json"Provider anthropic has billing issue (skipping all models)"Expected behavior
Subagents inherit
agentRuntime: claude-clifromagents.defaultsand route through the/usr/bin/claudebinary, which carries the correct Claude Code headers that bill against the Max/Pro subscription.Actual behavior
Subagents use the embedded HTTP runner regardless of
agents.defaults.agentRuntime. The embedded runner calls the Anthropic API directly without CLI headers, routing to the Extra Usage bucket. One billing error setsdisabledUntilinauth-state.json, which survives gateway restarts. All provider models are then skipped with"Provider anthropic has billing issue (skipping all models)"until the cooldown expires or the file is manually cleared.OpenClaw version
2026.2.21-2Operating system
Ubuntu 24.04 LTS (Linux 6.8.0-100-generic x86_64)
Install method
npm install -g openclawModel
anthropic/claude-sonnet-4-6Provider / routing chain
anthropic:claude-cliOAuth →/usr/bin/claudebinary - Actual (subagents): embedded HTTP runner →api.anthropic.comdirectly (no CLI headers)Additional provider/model setup details
Single auth profile
anthropic:claude-cli(OAuth). Noanthropic:manualprofile.agents.defaults.agentRuntime.id = "claude-cli"is set.agents.defaults.subagents.agentRuntimeis absent.The diagnostic tool flags this post-hoc under automated diagnosis but emits no warning at gateway startup. The lockout state is stored under
usageStats["anthropic:claude-cli"]in:Logs, screenshots, and evidence
Impact and severity
Impact and Severity
claude-cliOAuth with subagents — standard self-hosted setupWorkaround
Manually clear
usageStatsfields inauth-state.jsonand restart:Permanent fix: explicitly set
agents.defaults.subagents.agentRuntime.id = "claude-cli"inopenclaw.json.Additional Information
The diagnostic tool detects the misconfiguration but only when run manually. A gateway startup warning — analogous to the existing
allowInsecureAuth=truewarning — would catch this before it causes an outage.Additional information
Suggested Fix
Two changes, one behavioral and one UX:
1. Default inheritance (the real fix)
When
agents.defaults.agentRuntime.idis set,subagents.agentRuntimeshouldautomatically inherit it unless explicitly overridden. Same logic as any sane
config cascade — child inherits parent unless told otherwise.
2. Startup warning (the safety net)
When
agentRuntime.id = "claude-cli"is detected atagents.defaultsbutsubagents.agentRuntimeis unset, emit a startup warning — same pattern alreadyused for
allowInsecureAuth=true. Catches misconfiguration before it causes a24h outage.