Repository navigation
Description
Summary
On OpenClaw 2026.5.6 / Windows, the gateway can be listening and pass gateway health, while gateway probe and doctor still report it as unreachable/not running.
This looks related to earlier reports such as #74279 and #48360, but those conversations are locked, so I am filing a current-stable repro instead of adding there.
Environment
- OpenClaw:
2026.5.6 (c97b9f7) - Node:
v24.15.0 - OS: Windows
- Install: isolated npm install of
openclaw@latest - Profile:
imladri-sidequest - Gateway: loopback
127.0.0.1:18789
Reproduction
openclaw --profile imladri-sidequest gateway run --dev --port 18789 --auth none --bind loopback --force --allow-unconfigured --verbose
openclaw --profile imladri-sidequest gateway health
openclaw --profile imladri-sidequest gateway probe
openclaw --profile imladri-sidequest doctor --non-interactiveObserved
gateway health succeeds:
Gateway Health OK (1327ms)
gateway probe reports unreachable:
Reachable: no
Connect: failed - timeout
Found 0 gateways via Bonjour
doctor --non-interactive reports a contradiction:
Gateway not running- but also detects port
18789in use by the gateway PID and recommends stopping/changing the port
A direct TCP check confirms 127.0.0.1:18789 is listening.
Expected
If the gateway listener is alive and gateway health succeeds, then gateway probe / doctor should either report the gateway as reachable or clearly explain the specific auth/probe-path failure instead of reporting it as not running.
Notes
This run also reproduced the --auth none / device identity required issue tracked in #75780. That may be part of why the probe path fails, but the resulting CLI diagnostics are still misleading for a local user: one built-in command says healthy while another says unreachable/not running.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 7, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 18, 2026, 3:27 PM ET / 19:27 UTC.
Summary
Keep open. Current main still has the source-level probe and doctor misclassification, but #93948 is an open, clean fixing PR with closing syntax, so this issue should stay open until that PR merges or is rejected.
Reproducibility: yes. at source level: simulate a gateway client that accepts a WebSocket and closes before hello-ok, and current main settles with null connectLatencyMs so probe/status treat it as unreachable. I did not rerun the exact Windows install environment.
Root-cause cluster
Relationship:
canonicalCanonical: #79099
Summary: This issue is the current canonical report for the gateway probe/doctor reachable-but-errored misclassification; the open PR is the active fix candidate.
Members:
fixed_by_candidate: fix(gateway): distinguish reachable-but-errored from unreachable in probe diagnostics #93948 - Open clean PR with closing syntax changes the implicated probe and doctor files to distinguish reachable-but-errored from unreachable.same_root_cause: gateway probe false-negative timeout/close on loopback while gateway is healthy #48360 - Closed older report describes gateway probe false-negative timeout/close on loopback while the gateway is healthy.same_root_cause: Regression: Windows gateway probe/connect timeout returns in 2026.4.26 #74279 - Closed older Windows report describes gateway probe/connect timeout returning while the gateway remains healthy and usable.partial_overlap: Bug: gateway.auth.mode "none" breaks subagent spawning with "device identity required" #75780 - The auth-none device-identity failure can produce one of the accepted-then-closed states, but that issue's primary bug is backend self-pairing auth behavior.adjacent_distinct: OpenClaw 2026.5.4 Gateway status/health inconsistency on WSL2: diagnostics report ok/listener, external checks show no listener and HTTP 000 #78222 - The WSL2 report is another gateway diagnostic inconsistency, but its central claim is no externally observable listener while diagnostics report one, not the same accepted-close classification bug.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Do not queue a new repair job because #93948 is already the open fix candidate for this issue.
Review details
Best possible solution:
Review and land or close #93948; once the fix merges, close this issue as implemented by that PR.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level: simulate a gateway client that accepts a WebSocket and closes before hello-ok, and current main settles with null connectLatencyMs so probe/status treat it as unreachable. I did not rerun the exact Windows install environment.
Is this the best way to solve the issue?
Yes, the best fix is to carry accepted-but-errored gateway state through probe and doctor diagnostics, as the linked open PR attempts. A Windows-only timeout bump would be narrower than the observed auth and protocol-mismatch failures.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 4c9b4c32ef41.
Label changes
Label justifications:
P2: This is a real gateway diagnostic bug with multiple reports, but the gateway can still be healthy and usable in the main repro.impact:other: The issue affects setup and diagnostic reliability, which is maintainer-visible but outside the specific owned impact labels.Evidence reviewed
What I checked:
AGENTS.md:1, 4c9b4c32ef41)src/gateway/AGENTS.md:1, 4c9b4c32ef41)src/gateway/probe.ts:380, 4c9b4c32ef41)src/commands/gateway-status/helpers.ts:296, 4c9b4c32ef41)src/commands/doctor-gateway-health.ts:130, 4c9b4c32ef41)src/commands/doctor-gateway-daemon-flow.ts:486, 4c9b4c32ef41)Likely related people:
src/gateway/probe.ts,src/commands/doctor-gateway-health.ts,docs/gateway/index.md)src/gateway/probe.ts,src/commands/gateway-status/helpers.ts,src/commands/doctor-gateway-daemon-flow.ts)src/commands/doctor-gateway-health.ts,src/commands/doctor-gateway-daemon-flow.ts,src/gateway/probe.ts)src/commands/doctor-gateway-health.ts,src/gateway/server/ws-connection/message-handler.ts)src/gateway/probe.ts,src/commands/doctor-gateway-health.ts,src/commands/doctor-gateway-daemon-flow.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.YB0y commentedon May 10, 2026
Adding a Linux + protocol-mismatch case to broaden the scope of this issue beyond the Windows / connect-timeout repro.
Environment
package.jsonsays"version": "2026.5.10-beta.1", gateway running withv2026.5.7'sdist/(host Nodev22.22.2)1002 "protocol mismatch"(src/gateway/server/ws-connection/message-handler.ts:488).Reproduction
Observed (verbatim)
Same user-visible contradiction as the Windows / timeout case in the original report: one panel asserts the gateway is not running while the very next panel correctly identifies the gateway PID listening on the same port.
Source pointers (current
origin/main)The two
note("Gateway not running.", "Gateway")emit sites live insrc/commands/doctor-gateway-health.ts:49andsrc/commands/doctor-gateway-daemon-flow.ts:344. Both gate the rendering on aString(err).includes("gateway closed")substring check on the connect error. Anything that the heuristic doesn't recognize falls through toformatHealthCheckFailure(err)and only leaks a single non-paneledgateway connect failed: …line — but the "Gateway not running" panel header still ends up rendered for any reachable-but-errored state alongside the port-scan panel that proves the gateway is up.Suggested direction (mirrors what's already implied by this issue)
The connectivity probe should distinguish three states and only render "Gateway not running" for the first one:
The third state is what the port-scan panel already correctly detects. Folding the port-scan signal back into the gateway-status panel — or at least surfacing the underlying close reason (e.g.
protocol mismatchhere,connect failed: timeoutin the original Windows repro) — would resolve the contradiction in both reproductions.This case (Linux + protocol mismatch) is common during dev / upgrade flows where the global
openclawCLI on PATH and the running gateway daemon are last built from different versions.JIRBOY commentedon May 24, 2026
Repro confirmed on OpenClaw 2026.5.22 (a374c3a) / Windows 10 19045 / Node 24.14.1.
Additional reproducer:
Gateway is confirmed running (port 18789 listening, ESTABLISHED connections):
But multiple diagnostic commands report it as unreachable:
Note: The gateway health endpoint responds in ~639ms, which may be close to the probe timeout threshold. If the probe has a hard timeout < 1000ms, this could explain the false-negative on Windows where event loop / network latency is slightly higher.
h-mascot commentedon May 30, 2026
Additional HeraldLabs Windows beta repro from Miriam Peter's install-smoke report.
Environment:
2026.5.27 (27ae826)v24.16.0Observed during install:
Health check failed: timeout.http://127.0.0.1:18789/.Impact:
Source: HeraldLabs beta QA report, 2026-05-30.
fix(gateway): distinguish reachable-but-errored from unreachable in p…
fix(gateway): classify probe reachability by validated transport (#93948
steipete commentedon Jun 19, 2026
Landed in #93948 as 6256ad8. Gateway probe diagnostics now classify reachability only after transport validation and sanitize close diagnostics; focused gateway/doctor tests passed (307 tests).
6256ad8
fix(gateway): classify probe reachability by validated transport (ope…