openclaw - 💡(How to fix) Fix [Bug]: claude-cli harness regression on 2026.4.21+ (related to locked #61093) — workaround: claude-max-api-proxy [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#72077Fetched 2026-04-27 05:35:14
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×2closed ×1commented ×1

Root Cause

Filing as a new issue because #61093 is locked. Posting here so the workaround is searchable for anyone hitting the same regression — bobbercheng noted it was still broken on 2026.4.5; I am hitting it on 2026.4.21 → 2026.4.24.

Fix Action

Fix / Workaround

Filing as a new issue because #61093 is locked. Posting here so the workaround is searchable for anyone hitting the same regression — bobbercheng noted it was still broken on 2026.4.5; I am hitting it on 2026.4.21 → 2026.4.24.

Symptom: "claude-cli harness not registered" → dispatch falls back to API key routing → fails because no API key. Cooldown then doubles per failure (5min → 4hr → 24hr cap), so the bot stays silent for hours after the first miss.

Workaround that fully resolves it: wrap claude CLI as a subprocess via an OpenAI-compatible HTTP shim, point OpenClaw at it as an openai-completions provider. Anthropic explicitly sanctions claude -p subprocess use (HN 47844269) so this is not policy-gated.

Code Example

git clone https://github.com/wende/claude-max-api-proxy
cd claude-max-api-proxy && npm install && npm run build

---

openclaw config set models.providers.claude-max-proxy.baseUrl "http://127.0.0.1:3456/v1"
openclaw config set models.providers.claude-max-proxy.api "openai-completions"
openclaw config set agents.defaults.model.primary "claude-max-proxy/claude-opus-4-6"
openclaw config set agents.defaults.subagents.model.primary "claude-max-proxy/claude-sonnet-4-6"

---

# ~/.config/systemd/user/openclaw-gateway.service.d/proxy-dependency.conf
[Unit]
After=claude-max-proxy.service
Wants=claude-max-proxy.service
RAW_BUFFERClick to expand / collapse

Filing as a new issue because #61093 is locked. Posting here so the workaround is searchable for anyone hitting the same regression — bobbercheng noted it was still broken on 2026.4.5; I am hitting it on 2026.4.21 → 2026.4.24.


Hit this on OpenClaw 2026.4.21 → 2026.4.24 on Ubuntu 24.04, Node 24.14.1, Claude Max subscription via OAuth (no API key configured).

Repro: fresh npm install -g openclaw@latest, OAuth via openclaw onboard --auth-choice claude-cli, set primary model to claude-cli/claude-opus-4-7, send a message.

Symptom: "claude-cli harness not registered" → dispatch falls back to API key routing → fails because no API key. Cooldown then doubles per failure (5min → 4hr → 24hr cap), so the bot stays silent for hours after the first miss.

Workaround that fully resolves it: wrap claude CLI as a subprocess via an OpenAI-compatible HTTP shim, point OpenClaw at it as an openai-completions provider. Anthropic explicitly sanctions claude -p subprocess use (HN 47844269) so this is not policy-gated.

git clone https://github.com/wende/claude-max-api-proxy
cd claude-max-api-proxy && npm install && npm run build

Daemonize via a systemd user unit (Type=simple, ExecStart=node dist/server/standalone.js, port 3456) with linger enabled.

OpenClaw config:

openclaw config set models.providers.claude-max-proxy.baseUrl "http://127.0.0.1:3456/v1"
openclaw config set models.providers.claude-max-proxy.api "openai-completions"
openclaw config set agents.defaults.model.primary "claude-max-proxy/claude-opus-4-6"
openclaw config set agents.defaults.subagents.model.primary "claude-max-proxy/claude-sonnet-4-6"

Add a systemd drop-in so the gateway waits for the proxy:

# ~/.config/systemd/user/openclaw-gateway.service.d/proxy-dependency.conf
[Unit]
After=claude-max-proxy.service
Wants=claude-max-proxy.service

End-to-end verified: Telegram → openclaw → proxy → claude CLI → response.

Two gotchas worth documenting:

  1. baseUrl MUST end in /v1 — the OpenAI SDK appends /chat/completions directly. Without /v1 you get 404 on every POST.
  2. The proxys MODEL_MAP collapses model IDs to aliases (opus / sonnet / haiku), and the claude CLI then resolves to whatever Anthropics current model for that tier is. So claude-opus-4-6 in OpenClaw config actually executes as the latest Opus (4-7 at time of writing). /status shows the configured ID, not the executed one.

Adjacent bug worth flagging while youre in here: OpenClaw npm updates wipe per-extension node_modules/ (related: #62071, #61686, #33723, #61787). Workaround is an ExecStartPre script that runs targeted npm install against each dist/extensions/*/package.json. Happy to share that too.

extent analysis

TL;DR

To resolve the "claude-cli harness not registered" issue, wrap the claude CLI as a subprocess via an OpenAI-compatible HTTP shim and point OpenClaw at it as an openai-completions provider.

Guidance

  • Verify that the baseUrl ends with /v1 to avoid 404 errors on every POST.
  • Use the provided workaround by cloning the claude-max-api-proxy repository, building it, and configuring OpenClaw to use the proxy.
  • Configure a systemd user unit to daemonize the proxy and add a drop-in to make the gateway wait for the proxy.
  • Be aware of the MODEL_MAP collapsing model IDs to aliases and the potential discrepancy between configured and executed model IDs.

Example

The provided claude-max-api-proxy repository can be used as an example of how to create an OpenAI-compatible HTTP shim for the claude CLI.

Notes

This workaround is explicitly sanctioned by Anthropic, but it's essential to be aware of the potential limitations and gotchas, such as the MODEL_MAP behavior and the need for the /v1 suffix in the baseUrl.

Recommendation

Apply the workaround by using the claude-max-api-proxy repository and configuring OpenClaw to use the proxy, as this is the only provided solution that fully resolves the issue.

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 [Bug]: claude-cli harness regression on 2026.4.21+ (related to locked #61093) — workaround: claude-max-api-proxy [1 comments, 2 participants]