#sporadic claude errors

1 messages ยท Page 1 of 1 (latest)

gusty lake
#

Inference is working sometimes but also throwing errors, so my agent isn't staying on task and jobs will fail.

OpenClaw 2026.5.19 (a185ca2)

โ”‚
โ—‡

OpenClaw 2026.5.19 (a185ca2) โ€” Your AI assistant, now without the $3,499 headset.

Agent: main
Auth state file: ~/.openclaw/agents/main/agent/auth-state.json
Profiles:
- anthropic:claude-cli [claude-cli/oauth; expires 2026-05-21T19:00:00.723Z]
- openrouter:default [openrouter/api_key]

12:48:27+00:00 info agent/cli-backend {"subsystem":"agent/cli-backend"} cli exec: provider=claude-cli model=sonnet promptChars=955 trigger=user useResume=true session=present resumeSession=896179aa5fb6 reuse=reusable historyPrompt=present
12:48:27+00:00 info agent/cli-backend {"subsystem":"agent/cli-backend"} claude live session reuse: provider=claude-cli model=claude-sonnet-4-6
12:48:34+00:00 info agent/cli-backend {"subsystem":"agent/cli-backend"} claude live session turn: provider=claude-cli model=claude-sonnet-4-6 durationMs=7066 rawLines=22
12:48:39+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=16 error="MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered."
12:48:39+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:commitments:commitments-601dd8a8-0601-4d32-810a-9a79f4f9255b durationMs=17 error="MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered."
12:48:39+00:00 warn commitments {"subsystem":"commitments"} {"error":"MissingAgentHarnessError: Requested agent harness \"claude-cli\" is not registered."} commitment extraction failed
charred laurelBOT
#

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

robust bronzeBOT
gusty lake
#

[halr9000@neo .openclaw]$ openclaw models status

OpenClaw 2026.5.19 (a185ca2) โ€” 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 (2) : openrouter/minimax/minimax-m2.7, anthropic/claude-sonnet-4-6
Image model : -
Image fallbacks (0): -
Aliases (2) : opus -> anthropic/claude-opus-4-7, sonnet -> anthropic/claude-sonnet-4-6
Configured models (12): anthropic/claude-opus-4-7, anthropic/claude-haiku-4-5, anthropic/claude-sonnet-4-6, openrouter/google/gemma-4-31b-it, openrouter/minimax/minimax-m2.7, openrouter/moonshotai/kimi-k2.6, openrouter/nvidia/nemotron-3-super-120b-a12b, openrouter/qwen/qwen3.6-plus, openrouter/z-ai/glm-5.1, anthropic/claude-opus-4-6, anthropic/claude-opus-4-5, anthropic/claude-sonnet-4-5

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (2): anthropic (1), claude-cli (1)

  • anthropic effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=1, token=0, api_key=0) | anthropic:claude-cli=OAuth
  • claude-cli effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=1, token=0, api_key=0) | anthropic:claude-cli=OAuth | synthetic=plugin-owned | source=Claude CLI native auth
  • fal effective=env:05f8273b...0e744704 | env=05f8273b...0e744704 | source=env: FAL_KEY
  • openai effective=env:sk-proj-...9l_YyZoA | env=sk-proj-...9l_YyZoA | source=env: OPENAI_API_KEY
  • openrouter effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openrouter:default=sk-or-v1...601c3878
  • tavily effective=env:tvly-dev...qqfmyNBD | env=tvly-dev...qqfmyNBD | source=env: TAVILY_API_KEY

OAuth/token status

  • claude-cli
    • anthropic:claude-cli expiring expires in 6h
gray surgeBOT
# gusty lake Inference is working sometimes but also throwing errors, so my agent isn't stayi...

This is likely a config/runtime mixup, not Claude inference failing.

The successful lines are the claude-cli CLI backend doing a turn:

cli exec: provider=claude-cli ...
claude live session turn ...

The failing lines are a separate embedded-agent lane, especially commitments extraction, trying to use claude-cli as an agent harness:

MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered.

claude-cli is a CLI backend, not an embedded harness id. The embedded harness setting should be auto or pi unless you are using a registered plugin harness like codex.

gray surgeBOT
# gusty lake Inference is working sometimes but also throwing errors, so my agent isn't stayi...

Iโ€™d check these:

openclaw config get agents.defaults.embeddedHarness --json
openclaw config get agents.list --json
env | grep OPENCLAW_AGENT
openclaw doctor

If you see runtime: "claude-cli" or OPENCLAW_AGENT_RUNTIME=claude-cli, change/remove that. Conservative fix:

openclaw config set agents.defaults.embeddedHarness '{"runtime":"auto","fallback":"pi"}' --strict-json
openclaw config validate
openclaw gateway restart
gray surgeBOT
gray surgeBOT
# gusty lake [halr9000@neo .openclaw]$ openclaw models status OpenClaw 2026.5.19 (a185ca2) โ€”...

Thanks, that output helps. Your default model is anthropic/claude-sonnet-4-6, so normal inference should be going through the Anthropic provider, with Claude CLI auth available as a synthetic/native auth source.

The expiring in 6h line is worth refreshing soon, but it does not explain Requested agent harness "claude-cli" is not registered.

Next thing Iโ€™d check is still the embedded harness config/env:

openclaw config get agents.defaults.embeddedHarness --json
openclaw config get agents.list --json
env | grep OPENCLAW_AGENT

What weโ€™re looking for is any embeddedHarness.runtime or OPENCLAW_AGENT_RUNTIME set to claude-cli. If present, switch it back to auto/PI as above and restart the gateway.

Also refresh the Claude CLI OAuth before it expires:

gray surgeBOT
gusty lake
# gray surge Iโ€™d check these: ```bash openclaw config get agents.defaults.embeddedHarness --...

[halr9000@neo .openclaw]$ openclaw config get agents.defaults.embeddedHarness --json
Config path not found: agents.defaults.embeddedHarness. Run openclaw config validate to inspect config shape.
[halr9000@neo .openclaw]$ openclaw config get agents.list --json
[
{
"id": "main"
},
{
"id": "holocron-9000",
"name": "Holocron 9000",
"workspace": "/home/halr9000/.openclaw/workspace-holocron-9000",
"agentDir": "/home/halr9000/.openclaw/agents/holocron-9000/agent"
}
]
[halr9000@neo .openclaw]$ env | grep OPENCLAW_AGENT

ran doctor and I think it found related things to fix:

โ—‡ Legacy config keys detected โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ - agents.defaults.agentRuntime: agents.defaults.agentRuntime is ignored; set โ”‚
โ”‚ models.providers.<provider>.agentRuntime or a model-scoped agentRuntime instead. Run โ”‚
โ”‚ "openclaw doctor --fix". โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Doctor changes preview โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Removed agents.defaults.agentRuntime; runtime is now provider/model scoped. โ”‚

however, following restart, I am still seeing success and failure messages similar to above.

Your proposed fix is bad, config set failed with:

Error: Config validation failed: agents.defaults.embeddedHarness: Invalid input

gray surgeBOT
# gusty lake [halr9000@neo .openclaw]$ openclaw config get agents.defaults.embeddedHarness --...

Youโ€™re right. My embeddedHarness fix was wrong for your installed build. I checked newer docs/source, but your 2026.5.19 validator is still on the older agentRuntime shape. Sorry, that was a bad instruction.

Given what doctor found, the likely source was agents.defaults.agentRuntime having a stale value like claude-cli. If errors continue after doctor removed it, Iโ€™d check two places:

openclaw config get models.providers --json | rg -n 'agentRuntime|claude-cli'
openclaw config get agents.defaults.models --json | rg -n 'agentRuntime|claude-cli'
rg -n '"agentRuntime"|"agentHarnessId"|"claude-cli"' ~/.openclaw/openclaw.json ~/.openclaw/agents/*/sessions/sessions.json

If agentRuntime: "claude-cli" shows up under a provider/model, thatโ€™s the remaining bad config. Donโ€™t set agents.defaults.embeddedHarness on this build.

If only agentHarnessId: "claude-cli" shows up in sessions.json, thatโ€™s stale session state. First try a hard chat reset in the affected conversation:

/reset
gray surgeBOT
# gusty lake [halr9000@neo .openclaw]$ openclaw config get agents.defaults.embeddedHarness --...

Not /reset soft, because soft keeps the current session. If itโ€™s coming from internal commitment sessions too, back up first and then clear sessions rather than credentials/config:

openclaw backup create
# then move aside the affected ~/.openclaw/agents/<agent>/sessions directory, or use the interactive openclaw reset flow if youโ€™re okay resetting more state

Also useful: paste the exact post-doctor error lines with the lane=... value. That tells whether itโ€™s the main chat session or an internal commitments session still carrying the stale harness id.

gusty lake
gray surgeBOT
# gusty lake nothing in models.providers. here is output of the next two:

Yep, this explains it. The sessions file is mostly fine: all the agentHarnessId entries you showed are "pi", not "claude-cli".

The problem is still in ~/.openclaw/openclaw.json: you have multiple model-scoped blocks like:

"agentRuntime": { "id": "claude-cli" }

That config shape is valid for Claude CLI runtime routing, but it is explicit/fail-closed. So when the claude-cli runtime/harness is not registered in the lane doing the work, you get exactly:

Requested agent harness "claude-cli" is not registered

Two paths:

Immediate stability: remove those model-scoped agentRuntime blocks so the affected Anthropic models route normally instead of forcing claude-cli.

gray surgeBOT
# gusty lake nothing in models.providers. here is output of the next two:
openclaw backup create
openclaw config get agents.defaults.models --json
# for each model entry that has agentRuntime.id = claude-cli:
openclaw config unset 'agents.defaults.models["anthropic/claude-sonnet-4-6"].agentRuntime'
openclaw config validate
openclaw gateway restart

Repeat the config unset for the other Anthropic model keys that show agentRuntime.id: "claude-cli".

If you specifically want Claude CLI runtime: diagnose why it is not registering:

openclaw plugins list --enabled | rg -i 'anthropic|claude'
openclaw plugins inspect anthropic --runtime --json | rg -n 'claude-cli|agentHarness|cliBackends|error|load'
gray surgeBOT
gusty lake
#

I don't understand runtime options here. My goal is to use my claude sub. I don't care /how/ that's done. Some inference is working, and I don't understand the difference between that config and the invalid config. Please lay it out for me.

gray surgeBOT
# gusty lake I don't understand runtime options here. My goal is to use my claude sub. I don'...

Totally fair. The terms are muddy here.

Think of it as three separate layers:

  1. Model selection
    This is โ€œwhat model should answer?โ€
    Example: anthropic/claude-sonnet-4-6

  2. Auth / billing source
    This is โ€œwhat credentials pay for that model?โ€
    In your case, openclaw models status shows anthropic:claude-cli=OAuth and source=Claude CLI native auth. That means OpenClaw can use your Claude subscription login as the Anthropic auth source.

  3. Agent runtime / execution backend
    This is โ€œwhat engine actually runs the agent turn?โ€
    Usually PI handles it. If you set agentRuntime: { id: "claude-cli" }, you are forcing a special Claude CLI runtime/backend path.

The confusing part: using your Claude subscription does not necessarily require forcing agentRuntime.id = "claude-cli" everywhere. Your working inference is likely:

gray surgeBOT
# gusty lake I don't understand runtime options here. My goal is to use my claude sub. I don'...
model = anthropic/claude-sonnet-4-6
auth = Claude CLI OAuth / subscription
runtime = normal PI path

Your failing config is:

model = anthropic/claude-sonnet-4-6
auth = Claude CLI OAuth / subscription
runtime = forced claude-cli

That second one only works in lanes where the claude-cli runtime/backend is registered and supported. Your logs show some lanes can do Claude CLI turns, but another lane, commitments extraction, cannot find that forced runtime and fails with:

gray surgeBOT
# gusty lake I don't understand runtime options here. My goal is to use my claude sub. I don'...
Requested agent harness "claude-cli" is not registered

So for your goal, โ€œuse my Claude sub and keep jobs reliable,โ€ Iโ€™d do this:

  • Keep the anthropic:claude-cli OAuth auth profile.
  • Keep default model as anthropic/claude-sonnet-4-6.
  • Remove the model-scoped agentRuntime: { id: "claude-cli" } overrides unless you are deliberately testing the native Claude CLI runtime.
  • Restart, then verify normal turns still bill/use the Claude CLI auth source via openclaw models status / logs.

In short: Claude CLI auth is the part you want. Forced Claude CLI runtime is the part currently biting you.

Docs wording for this area:
https://docs.openclaw.ai/concepts/agent-runtimes
https://docs.openclaw.ai/providers/anthropic