durationMs=6 error="MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered."
00:37:21+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:telegram:direct:8668358572 durationMs=8 error="MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered."
00:37:21+00:00 error channels/discord {"subsystem":"channels/discord"} [Aelmo] channel exited: Failed to get gateway information from Discord: Discord API /gateway/bot failed (401): {"message": "401: Unauthorized", "code": 0}
0
00:37:21+00:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 254ms conn=5fe1870d…50de id=318a25ff…d152
00:37:22+00:00 info telegram/send {"subsystem":"telegram/send"} telegram outbound send ok accountId=default chatId=8668358572 messageId=8153 operation=sendMessage deliveryKind=text chunkCount=1
00:37:26+00:00 info channels/discord {"subsystem":"channels/discord"} [aelmo] starting provider
00:37:27+00:00 info channels/discord {"subsystem":"channels/discord"} discord channel resolve failed; using config entries. Discord API /users/@me/guilds failed (401): 401: Unauthorized
00:37:27+00:00 error channels/discord {"subsystem":"channels/discord"} [Aelmo] channel exited: Failed to get gateway information from Discord: Discord API /gateway/bot failed (401): {"message": "401: Unauthorized", "code": 0}
00:37:27+00:00 info channels/discord {"subsystem":"channels/discord"} [Aelmo] auto-restart attempt 2/10 in 11s
00:37:38+00:00 info channels/discord {"subsystem":"channels/discord"} [aelmo] starting provider
00:37:38+00:00 info channels/discord {"subsystem":"channels/discord"} discord channel resolve failed; using config entries. Discord API /users/@me/guilds failed (401): 401: Unauthorized
#⚠️ Requested agent harness "claude-cli" is not registered.
1 messages · Page 1 of 1 (latest)
This looks like two separate issues:
MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered.
claude-cliis a CLI backend/provider, not an embedded agent harness id. The embedded harness runtime should usually stayautoorpi; registered harness ids are things likecodex, notclaude-cli.
Check/remove anything like this from config/env:
agents: {
defaults: {
embeddedHarness: {
runtime: "claude-cli",
fallback: "none"
}
}
}
or unset OPENCLAW_AGENT_RUNTIME=claude-cli.
For Claude CLI, configure/select it as a model/backend instead, and make sure Claude Code auth is ready on the same host:
openclaw --version
claude auth status --text
openclaw models auth login --provider anthropic --method cli --set-default
openclaw doctor
openclaw gateway restart
Docs:
https://docs.openclaw.ai/gateway/configuration-reference#agentsdefaultsembeddedharness
https://docs.openclaw.ai/gateway/cli-backends
- Discord
401: Unauthorized
That part is your Discord bot token/account config failing auth. It is separate from the harness error. Re-check the configured Discord token for account Aelmo/aelmo, then restart the gateway. The openclaw status --all output is the best next thing to share here, with tokens redacted.
Current: anthropic/claude-opus-4-7 (selected)
Active: claude-cli/claude-opus-4-7 (runtime)
This is my active models. Is this the problem?
Probably not. Seeing:
Current: anthropic/... (selected)
Active: claude-cli/... (runtime)
usually means model routing/auth resolved to the Claude CLI backend at runtime. That is allowed.
The specific error says something different: OpenClaw is trying to use claude-cli as an agent harness. claude-cli is a CLI backend/provider, not a valid embeddedHarness.runtime.
Check these two places:
openclaw --version
openclaw config get agents.defaults.embeddedHarness
env | grep OPENCLAW_AGENT_RUNTIME
If you see runtime: "claude-cli" or OPENCLAW_AGENT_RUNTIME=claude-cli, change/remove that. A normal value is:
embeddedHarness: {
runtime: "auto",
fallback: "pi"
}
Then restart:
openclaw gateway restart
The Discord 401 Unauthorized in your log is separate: that is a bad/expired Discord bot token for that configured Discord account.
Version - OpenClaw 2026.5.19 (a185ca2)
error - Config path not found: agents.defaults.embeddedHarness. Run openclaw config validate to inspect config shape.
That means it is probably not set in your config file, which points harder at an env var or a persisted session pin.
Run these next:
env | grep -E 'OPENCLAW_AGENT_RUNTIME|OPENCLAW_AGENT_HARNESS'
openclaw config validate
openclaw status --all
If the env command prints OPENCLAW_AGENT_RUNTIME=claude-cli, remove that from wherever your gateway service gets env vars, then restart:
openclaw gateway restart
One more nuance: harness choice is pinned per session. After changing this, start a fresh session with /new or reset the affected chat/session, because an old transcript may keep trying the previously selected harness.
Your version is recent enough that the docs I checked match the feature shape, but 2026.5.19 is not today’s latest main, so if this persists after env/session reset, update and then file the remaining repro as a GitHub issue: https://github.com/openclaw/openclaw/issues
-/new helped. That was weird. I'm having my bot look into it further. Thank you Krill!
Glad /new cleared it. That fits the harness pinning bit: the old session likely kept a stale claude-cli harness id, while the fresh session re-resolved correctly.
If this fixed the thread, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow indexes it for the next person. 🦞