openclaw-windows-node icon indicating copy to clipboard operation
openclaw-windows-node copied to clipboard

Native Gateway setup aborts on the default 10-second health RPC deadline

Open roboclaw-bot opened this issue 3 weeks ago • 3 comments

Problem

Native Gateway onboarding in OpenClaw.Tray.WinUI can fail at "Finishing setup" when the health RPC exceeds its default 10-second deadline. The app then stops the Gateway and reports that setup could not finish.

Original public report by @Steklorez, with reproduction and logs: https://github.com/openclaw/openclaw/issues/196251

Reported environment and behavior

  • Windows 11 x64, MSIX / WinGet, Gateway 2026.11.1.
  • Install a local native Gateway, choose Ollama, then "Use this model".
  • openclaw.exe gateway health --json returns gateway_transport_error, kind: timeout, timeoutMs: 10000; the command takes 14130 ms including CLI startup.
  • The app next invokes clawctl gateway-service stop and fails setup.

The command duration does not establish that the Gateway becomes ready at 14 seconds. Neither a native reproduction nor a successful longer-deadline run has been verified by this routing investigation.

Current source evidence

src/OpenClaw.SetupEngine.UI/NativeGatewaySetupHost.cs, VerifyHealthAsync, invokes gateway health --json without an explicit RPC timeout. Its outer CliCommandTimeout is a separate process budget. Core already exposes --timeout; increasing the global CLI RPC default would affect unrelated callers.

Please diagnose the startup readiness deadline at this setup owner, preserving cancellation and visible failure/retry recovery. Acceptance should exercise native setup with the packaged Gateway through actual readiness and the final setup result, not only assert the command arguments.

This is an owner-routing issue, not a claimed fix. The original reporter does not need to resubmit their logs.

roboclaw-bot avatar Nov 10 '26 00:11 roboclaw-bot

Codex review: this still needs some work.

Summary The exact deadline defect is fixed on main and shipped in stable v2026.11.3, but the supplied maintainer-author guard requires explicit resolution judgment.

Reproducibility: Affected-release failures are documented, but no current-main reproduction was run; current source removes the inherited ten-second deadline and adds authenticated readiness handling.

Root-cause cluster Relationship: canonical Canonical: https://github.com/openclaw/openclaw-windows-node/issues/2097 Summary: This issue owns the deadline report, with merged readiness and recovery repairs covering related parts of the setup flow.

Members:

  • fixed_by_candidate: https://github.com/openclaw/openclaw-windows-node/pull/2215 - Merged repair replaces focused finalization's separate CLI health connection with bounded authenticated health and model verification.
  • partial_overlap: https://github.com/openclaw/openclaw-windows-node/pull/2198 - Merged repair restores failure recovery controls and diagnostics without changing the health deadline.

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Maintainer decision needed

  • Question: Do stable fix inclusion, the successful alpha setup, and merged readiness/recovery repairs satisfy resolution of this issue?
  • Recommendation: Accept the existing resolution evidence: Explicitly resolve the deadline report using the shipped repair and credited alpha completion, without claiming stable runtime proof.
  • Why: The supplied MEMBER author guard requires explicit judgment despite the live API reporting CONTRIBUTOR, and stable on-device acceptance remains unverified.

Next step Have the setup owner explicitly accept the shipped repair evidence or specify one stable native setup and in-product recovery acceptance run.

Review details

Best possible solution:

Resolve the repaired deadline report explicitly, retaining visible in-product recovery and any specifically required stable acceptance check.

Do we have a high-confidence way to reproduce the issue?

Affected-release failures are documented, but no current-main reproduction was run; current source removes the inherited ten-second deadline and adds authenticated readiness handling.

Is this the best way to solve the issue?

The existing setup-owned deadline and shared authenticated readiness repairs address the reported boundary without changing global CLI defaults or adding configuration.

AGENTS.md: found and applied where relevant.

Remaining risk / open question:

  • The available successful on-device setup used alpha.104; the discussion and merged PRs do not establish equivalent stable delayed-start completion and interactive recovery.

Codex review notes: model internal, reasoning medium; reviewed against b762c8dc12a8; fix evidence: release v2026.11.3-alpha.104, commit fbc02870795c.

Label changes

Label changes:

  • remove P0: Current review triage priority is none.
  • remove impact:ux-release-blocker: Current review selected no impact labels.
Evidence reviewed

What I checked:

  • Exact deadline repair: VerifyHealthAsync explicitly passes --timeout using the existing native CLI budget, which defaults to 240000 milliseconds; the fixing commit's REST patch confirms replacement of the argument list that inherited the CLI default. (src/OpenClaw.SetupEngine.UI/NativeGatewaySetupHost.cs:130, fbc02870795c)
  • Published stable contains the repair: The published latest stable release is v2026.11.3; its annotated tag resolves to this commit, contains the timeout repair, and retains the explicit health timeout. The earliest published release found containing the repair is v2026.11.3-alpha.104. (src/OpenClaw.SetupEngine.UI/NativeGatewaySetupHost.cs:134, 66b9b5a559a0)
  • Broader readiness repair has merged: https://github.com/openclaw/openclaw-windows-node/pull/2215 (fix(setup): avoid readiness flakes during native Gateway handoff) merged and is included in stable v2026.11.3; current focused finalization verifies health and the model on one authenticated connection within the remaining admission budget. (src/OpenClaw.SetupEngine/NativeGatewaySetupSession.cs:423, 0086a65c7c64)
  • Regression coverage inspected: Current tests cover explicit default and overridden CLI deadlines, failure propagation, cancellation, startup advancing beyond ten seconds, and health consuming the remaining admission budget; these tests were read, not executed. (tests/OpenClaw.SetupEngine.Tests/NativeGatewaySetupConnectionTests.cs:23, b762c8dc12a8)
  • Credited native reproduction and alpha success: BulletproofHandyman reports repeated Companion 2026.11.1 failures after reopening setup, including a logged 10000ms health timeout, followed by successful alpha.104 completion with --timeout 240000: https://github.com/openclaw/openclaw-windows-node/issues/2097#issuecomment-6883898286.
  • Recovery repair and visual evidence: https://github.com/openclaw/openclaw-windows-node/pull/2198 (fix(setup): keep recovery actions visible after finishing fails) merged; the downloaded screenshot visibly shows Back, Check readiness again, and Collect logs, but its body identifies synthetic native rendering rather than live setup completion. (src/OpenClaw.SetupEngine.UI/Pages/AiCompletionPage.xaml:34, 62c1ba07fa59)

Likely related people:

  • Pedro Larroy: Raw commit e3d5c07e5257254f9f1345307da50006cb7931a7 adds src/OpenClaw.SetupEngine/NativeGatewayCliTimeout.cs:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e3d5c07e5257; files: src/OpenClaw.SetupEngine/NativeGatewayCliTimeout.cs)
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Reviewed November 29, 2026, 2:21 AM ET / 07:21 UTC.

clawsweeper[bot] avatar Nov 10 '26 00:11 clawsweeper[bot]

Reproduced on a real native setup, through to the final setup result, on a slower laptop: Core i5-13420H, 16 GB, SSD, Windows 11 Home 26200, Companion 2026.11.1, Store gateway package 2026.11.100.0. Each run was a fresh local Windows user, driven through the setup UI.

Cause, from the Companion's own setup log (%APPDATA%\OpenClawTray\Logs\Setup\native-setup-*.jsonl): after the AI choice is saved, setup logs "Restarting the package-managed Gateway". When the new gateway is up, it runs openclaw.exe gateway health --json with the default 10 s RPC deadline:

22:52:31.206Z info  Restarting the package-managed Gateway.
22:53:41.562Z info  Starting the packaged Gateway and verifying its listener...
22:53:44.634Z info  Checking native Gateway health...
22:54:01.837Z warn  cmd.done: openclaw.exe exit=1 (17202ms) {"ok": false, "error": {"type": "gateway_transport_error", "kind": "timeout", "message": "gateway timeout after 10000ms", "timeoutMs": 10000}}
22:54:01.851Z debug Running clawctl gateway-service stop ...

Setup then shows "Windows setup could not finish. Your choice was not launched." This matches the report in openclaw/openclaw#196251.

Results on this laptop (Ollama local-only as the AI):

  • 2026.11.1, clean first pass on a new user: passed (1 of 1).
  • 2026.11.1, after a jammed provider dialog ("The setup outcome is not confirmed ...") and one app reopen in the same session: failed 3 of 3. The health timeout above is from one of them; a second fits it (its first health call after the restart answered 5.3 s server-side on a connection the app had already dropped); the third has no setup log.
  • 2026.11.3-alpha.104, same jam-and-reopen sequence: passed (1 of 1). Its setup runs openclaw.exe gateway health --json --timeout 240000, which answered {"ok": true, "durationMs": 3773} after 18.2 s.

That is consistent with the longer health deadline fixing it here: one run, with roughly a 1 s margin over the old 10 s on this laptop. alpha.104 also carries other restart and recovery changes. (alpha.118 not tested.)

What a user can reach on 2026.11.1 after the failure:

  • "Back", then "Use this model" again: same failure (it restarts the gateway again).
  • Quit from the tray and reopen: setup starts over at step 1.
  • "Connect to an existing Gateway": asks for an address plus a setup code or token.
  • "Set up a Gateway later": the app opens with "No gateway yet", although the native gateway is installed.

(Edited: the earlier version of this comment attributed the failure to restart time in general. The setup log above shows the 10 s health deadline is the trigger in the run that has a setup log.)

BulletproofHandyman avatar Nov 14 '26 20:11 BulletproofHandyman

This issue has been automatically marked as stale due to inactivity. Please add updated OpenClaw Windows details or it will be closed.

github-actions[bot] avatar Nov 29 '26 03:11 github-actions[bot]