openclaw - 💡(How to fix) Fix [Bug]: `openclaw health --json` fails while `openclaw gateway health --json` succeeds on the same healthy gateway [2 comments, 3 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#72079Fetched 2026-04-27 05:35:10
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Timeline (top)
commented ×2closed ×1

On a healthy local gateway, the top-level CLI command:

openclaw health --json

can fail or time out even though the direct gateway health paths succeed against the same running gateway:

openclaw gateway health --json
openclaw gateway call health --params '{}'

This does not appear to be a general gateway outage. It looks like the top-level health wrapper is not equivalent to the direct gateway health path.

Root Cause

Because of that, this looks like a real CLI wrapper bug rather than just local daemon drift.

Fix Action

Fix / Workaround

A local patch to the installed health wrapper that added:

Code Example

openclaw health --json

---

openclaw gateway health --json
openclaw gateway call health --params '{}'

---

openclaw gateway health --json
openclaw gateway call health --params '{}'

---

openclaw health --json

---

openclaw doctor --non-interactive
openclaw doctor --fix --non-interactive --yes

---

openclaw gateway health --json
openclaw gateway call health --params '{}'
openclaw health --json

---

clientName: "cli",
mode: "cli"
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug / CLI wrapper mismatch

Beta release blocker

No

Summary

On a healthy local gateway, the top-level CLI command:

openclaw health --json

can fail or time out even though the direct gateway health paths succeed against the same running gateway:

openclaw gateway health --json
openclaw gateway call health --params '{}'

This does not appear to be a general gateway outage. It looks like the top-level health wrapper is not equivalent to the direct gateway health path.

Steps to reproduce

  1. Start a healthy local OpenClaw gateway
  2. Verify direct gateway health succeeds:
openclaw gateway health --json
openclaw gateway call health --params '{}'
  1. Run:
openclaw health --json
  1. Observe that the top-level health command fails or times out while the direct gateway health commands still succeed.

Expected behavior

openclaw health --json should succeed whenever openclaw gateway health --json succeeds against the same configured gateway.

Actual behavior

  • openclaw gateway health --json: succeeds
  • openclaw gateway call health --params '{}': succeeds
  • openclaw health --json: fails or times out

OpenClaw version

2026.4.24

Operating system

Ubuntu 24.04 under WSL2 on a Windows VM

Install method

npm global install

Model

N/A for reproduction

Provider / routing chain

N/A for reproduction

Additional provider/model setup details

The environment also had Azure model routing configured for agents, but this issue reproduced on the health command path itself and did not depend on model execution.

Logs, screenshots, and evidence

I ran the supported repair path first:

openclaw doctor --non-interactive
openclaw doctor --fix --non-interactive --yes

That restored the canonical gateway service, but the mismatch remained:

openclaw gateway health --json
openclaw gateway call health --params '{}'
openclaw health --json

The first two succeeded, the top-level health command did not.

I then inspected the installed bundle and found that the top-level health wrapper appears to call the shared gateway path without the same CLI caller identity used by other CLI-to-gateway commands.

A local patch to the installed health wrapper that added:

clientName: "cli",
mode: "cli"

to the gateway call made openclaw health --json start succeeding immediately, with no other environment change.

Because of that, this looks like a real CLI wrapper bug rather than just local daemon drift.

Impact and severity

This makes the main user-facing health command unreliable and misleading:

  • users can see openclaw health fail while the gateway is actually healthy
  • diagnostics become confusing because the lower-level health commands work
  • it encourages users to misclassify the issue as gateway instability instead of a CLI wrapper mismatch

Additional information

This report is intentionally narrow and does not include separate issues I observed during the same session, such as:

  • stale researcher session state
  • wrong wiki/hot.md content
  • plugin staging ENOTEMPTY warnings

Those looked like separate concerns and should not be conflated with this health-wrapper bug.

extent analysis

TL;DR

The top-level openclaw health --json command can be fixed by modifying the CLI wrapper to include the correct caller identity.

Guidance

  • The issue is likely caused by the top-level health wrapper not using the same CLI caller identity as other CLI-to-gateway commands.
  • To verify, compare the gateway call parameters used by openclaw health --json and openclaw gateway health --json.
  • A potential workaround is to patch the installed health wrapper to include clientName: "cli" and mode: "cli" in the gateway call.
  • The fix can be tested by running openclaw health --json after applying the patch and verifying that it succeeds.

Example

// Patched health wrapper code
const gatewayCall = {
  // ... existing code ...
  clientName: "cli",
  mode: "cli"
};

Notes

The provided patch is specific to the openclaw version 2026.4.24 and may not apply to other versions.

Recommendation

Apply the workaround by patching the installed health wrapper to include the correct caller identity, as this is a targeted fix for the identified 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…

FAQ

Expected behavior

openclaw health --json should succeed whenever openclaw gateway health --json succeeds against the same configured gateway.

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]: `openclaw health --json` fails while `openclaw gateway health --json` succeeds on the same healthy gateway [2 comments, 3 participants]