openclaw - ✅(Solved) Fix Fix: CLI `doctor` and `status` trigger false restarts due to hardcoded 3000ms loopback timeouts [2 pull requests, 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#64400Fetched 2026-04-11 06:15:05
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1

Fix Action

Fix / Workaround

Proposed Fix:

  1. Patch the WS server connect path to allow unauthenticated loopback clients if no shared auth is configured.
  2. Migrate doctor to use a lightweight liveness check (status method) for its Phase A gating instead of the heavyweight health RPC.
  3. Relax the loopback failure interpretation in status to prevent treating timeout/1006 as authoritative when the local HTTP listener is provably alive.

For reference, we've successfully patched this locally against the compiled dist/ bundle.

PR fix notes

PR #64511: fix: use lightweight status RPC for doctor Phase A health gate

Description (problem / solution / changelog)

Summary

Fixes issue #64400: CLI and trigger false restarts due to hardcoded 3000ms loopback timeouts.

Problem

When heavily loaded with agents, background crons, or slow RPCs at startup, the OpenClaw gateway can take longer than 3 seconds to respond to health checks. The command's Phase A gate was calling the heavyweight RPC (which probes all channels) via , using the same call path as the detailed health check. This caused false timeouts and triggered unsafe restart paths.

Fix

Replace the heavyweight call in (used for Phase A liveness gating in ) with a direct lightweight RPC call. The method returns a simple gateway status summary without channel probing, making it appropriate for fast liveness checks.

Before:

await healthCommand({ json: false, timeoutMs, config: params.cfg }, params.runtime);

After:

await callGateway({ method: "status", timeoutMs, config: params.cfg });

Also removes unused imports (, ).

Testing

The fast-path mocks already mock , so existing tests are unaffected. The handler is registered in and is lighter than (no channel probing).

Changed files

  • src/commands/doctor-gateway-health.ts (modified, +2/-4)

PR #54959: docs: add OpenShell deployment guide

Description (problem / solution / changelog)

Summary

Add a comprehensive deployment guide for running OpenClaw inside NVIDIA OpenShell sandboxes.

The guide covers:

  • Prerequisites and quick start with the automated setup script
  • Manual step-by-step setup — Docker, gateway, sandbox creation, CoreDNS fix, OpenClaw bundling, Slack configuration
  • Network policy — policy structure, the Slack REST/WebSocket split, why *.slack.com wildcards break Socket Mode on v0.0.15+, tls: skip for WebSocket raw TCP passthrough
  • WebSocket proxy patch — why the ws library doesn't honor HTTPS_PROXY, the Module._load monkey-patch solution, applicability to Discord gateway connections
  • Troubleshooting — DNS failures, WebSocket issues, bot ignoring DMs, npm hangs, gateway corruption
  • Known limitations — web_fetch/web_search proxy issues, binary identification requirements

Also adds the new page to the Platforms tab in docs.json navigation.

Related issues

This addresses the documentation gap for sandboxed/proxied deployments. Related issues reporting proxy, WebSocket, and DNS failures in sandboxed environments:

  • #49948 — web_fetch proxy issues
  • #47598 — WebSocket connection failures
  • #46306 — web_search proxy errors
  • #50655 — DNS resolution failures in sandboxed environments
  • #44980 — proxy configuration issues
  • #51049 — sandbox networking problems

Changed files

  • docs/.i18n/glossary.zh-CN.json (modified, +28/-0)
  • docs/docs.json (modified, +2/-1)
  • docs/platforms/openshell.md (added, +836/-0)
RAW_BUFFERClick to expand / collapse

Issue: When heavily loaded with agents, background crons, or slow RPCs at startup, the OpenClaw gateway can take longer than 3 seconds to respond to health checks. The doctor command hardcodes a 3000ms timeout for the heavyweight websocket health RPC. When it times out, doctor falsely assumes the gateway is dead and triggers an unsafe restart path, cascading the failure. Additionally, unauthenticated local loopback probes falsely return 1006 due to an overly strict device-identity gate on the WS connect path.

Proposed Fix:

  1. Patch the WS server connect path to allow unauthenticated loopback clients if no shared auth is configured.
  2. Migrate doctor to use a lightweight liveness check (status method) for its Phase A gating instead of the heavyweight health RPC.
  3. Relax the loopback failure interpretation in status to prevent treating timeout/1006 as authoritative when the local HTTP listener is provably alive.

For reference, we've successfully patched this locally against the compiled dist/ bundle.

extent analysis

TL;DR

Increase the timeout for the heavyweight websocket health RPC or migrate to a lightweight liveness check to prevent false timeouts and unsafe restarts.

Guidance

  • Patch the WS server connect path to allow unauthenticated loopback clients when no shared auth is configured to prevent false 1006 errors.
  • Consider migrating the doctor command to use the lightweight status method for liveness checks instead of the heavyweight health RPC to reduce timeout issues.
  • Relax the loopback failure interpretation in status to account for potential timeouts or 1006 errors when the local HTTP listener is alive.
  • Verify the fix by testing the doctor command under heavy load and checking for false restarts.

Example

No code example is provided as the issue does not contain specific code snippets that can be modified.

Notes

The proposed fix involves patching the WS server and modifying the doctor command, which may require additional testing to ensure compatibility and correctness.

Recommendation

Apply the proposed workaround by patching the WS server connect path and migrating the doctor command to use the lightweight status method, as this approach has been successfully tested locally.

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