openclaw - 💡(How to fix) Fix 4.x → 5.18 upgrade leaves claude-cli harness unregistered (auth-profile mapping not migrated)

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…

Related but distinct: #82847 (closed) describes the same error string emerging from the followup queue drain. The issue below is a different trigger — the 4.x → 5.x migration leaves the Anthropic CLI backend unregistered because the auth-profile is absent.

After upgrading from 2026.4.15 to 2026.5.18 on macOS, the gateway repeatedly throws:

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

This surfaces in Telegram chats as ⚠️ Requested agent harness "claude-cli" is not registered. for every agent that uses claude-cli (5 agents in our deployment). A gateway restart helps for ~25 minutes, then the same loop returns.

Error Message

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

Root Cause

The 5.18 auth-profile system requires:

  • ~/.openclaw/agents/main/agent/auth-profiles.json → entry anthropic:claude-cli
  • ~/.openclaw/agents/main/agent/auth-state.json → mapping lastGood.claude-cli = "anthropic:claude-cli"

The 4.15 → 5.18 migration does not create either of these. Without them, the harness loader cannot resolve credentials for claude-cli and refuses to register the harness.

Code Example

MissingAgentHarnessError: Requested agent harness "claude-cli" is not registered.
RAW_BUFFERClick to expand / collapse

Summary

Related but distinct: #82847 (closed) describes the same error string emerging from the followup queue drain. The issue below is a different trigger — the 4.x → 5.x migration leaves the Anthropic CLI backend unregistered because the auth-profile is absent.

After upgrading from 2026.4.15 to 2026.5.18 on macOS, the gateway repeatedly throws:

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

This surfaces in Telegram chats as ⚠️ Requested agent harness "claude-cli" is not registered. for every agent that uses claude-cli (5 agents in our deployment). A gateway restart helps for ~25 minutes, then the same loop returns.

Environment

  • macOS, Node 22.x, openclaw 2026.5.18 (upgraded from 2026.4.15)
  • 9 Telegram bots, 5 agents on claude-cli harness, 1 on codex
  • Pre-upgrade auth via claude /login (OAuth, Keychain)

Steps to reproduce

  1. Have a working 2026.4.15 installation with claude-cli authenticated via claude /login.
  2. Run npm install -g [email protected].
  3. Restart gateway.
  4. Send any message to a claude-cli-backed agent on Telegram.

Expected

claude-cli harness loads, authenticates from the Keychain entry created by claude /login, agent responds.

Actual

MissingAgentHarnessError returned; agent sends the warning to Telegram. Pattern repeats indefinitely. In one incident we observed 83 gateway SIGTERMs in 48 minutes (apparent crash-loop) before the system stabilised.

Root cause

The 5.18 auth-profile system requires:

  • ~/.openclaw/agents/main/agent/auth-profiles.json → entry anthropic:claude-cli
  • ~/.openclaw/agents/main/agent/auth-state.json → mapping lastGood.claude-cli = "anthropic:claude-cli"

The 4.15 → 5.18 migration does not create either of these. Without them, the harness loader cannot resolve credentials for claude-cli and refuses to register the harness.

Fix (manual, working)

Manually adding the profile and mapping to both files (matching the structure used elsewhere in auth-profiles.json) restores claude-cli immediately. No gateway restart needed if hot-reload is honoured.

Suggested upstream change

The migration step from any 4.x to 5.x should:

  1. Detect existing claude-cli usage (any agent in openclaw.json with agentRuntime.id = "claude-cli").
  2. Auto-create the anthropic:claude-cli profile and lastGood.claude-cli mapping using the existing claude /login Keychain entry.
  3. Fail the migration explicitly if step 2 cannot complete, rather than starting a gateway that hands out MissingAgentHarnessError indefinitely.

Happy to provide log excerpts or test the fix on a follow-up release.

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

openclaw - 💡(How to fix) Fix 4.x → 5.18 upgrade leaves claude-cli harness unregistered (auth-profile mapping not migrated)