Skip to content

[Bug] Native Gateway setup stops a progressing launch after 180s; same installation needs 210s to become ready #1969

Closed

Description

@icxnc1

Summary

Native Windows Gateway setup fails at StepVerify because Companion's 180-second readiness budget expires while the package-managed Gateway is still making startup progress. Companion then rolls back the launch by stopping the Gateway.

On the same installation, a previous manual launch reached gateway ready after 210.474 seconds and the browser Control UI subsequently connected successfully after entering the existing Gateway token.

This report distinguishes the observed timeout/rollback behavior from the underlying startup slowness, whose cause has not been established.

Environment

  • Windows build: 10.0.28120.3393, x64
  • Store-signed Gateway MSIX: OpenClawFoundation.OpenClawGateway_2026.10.900.0_x64__rfcbke2p71se2
  • Packaging commit: 62c79e281fe997c4452d7494b660f0ac3bde51a4
  • Bundled OpenClaw: 2026.10.9, commit 8b18b5578f66eab1501cba4cef2310d88bfb9a41
  • Node.js: 24.22.1
  • MXC SDK: 1.0.1; isolated-session integration v1
  • Companion version was reported as 2026.9.8-1 in an earlier diagnostics export; the exact Companion build generating this latest setup log has not been independently verified.
  • Gateway endpoint: loopback, configured port 58415

Steps observed

  1. Run native Gateway setup through Windows Companion with the Store Gateway already installed.
  2. Package acquisition reports that the package is already installed and no upgrade is available.
  3. Configuration validation succeeds.
  4. Companion starts the package-managed Gateway and polls for a verified listener.
  5. The launch is acknowledged after about 91 seconds, but the listener is not ready within 180 seconds.
  6. Companion fails StepVerify and rolls back the Gateway start.

Actual behavior and attached log excerpts

These are selected excerpts from the local diagnostic exports; credentials, user/profile paths and session identifiers are omitted. Times below are local UTC+02:00 unless explicitly marked UTC.

Successful manual startup earlier on the same installation

From openclaw-diagnostics-20261101-105442:

12:48:44 Starting the gateway in the isolated session on its configured port.
12:50:16 Gateway start finished: Starting. The supervised gateway launch was accepted, but the gateway is not listening yet.
12:52:04 http server listening
12:52:15 gateway ready
12:52:15 startup phase: ready 1.2ms total=210474.1ms

The Control UI later opened directly in the browser and connected using the existing Gateway token. This confirms a successful Gateway/UI connection, not successful model inference.

Latest failed Companion setup

From native-setup-20261101-110745.jsonl (timestamps in UTC):

11:09:19 config validate --json exited 0:
{"valid":true,"warnings":[]}
stderr: CLI cleanup timed out: shared-state after 5000ms

11:09:23 Native setup step: StepVerify.
11:09:27 [WS] Native Gateway start requested on port 58415 (budget 180s).
11:10:58 [WS] Native Gateway start acknowledged after 91,4s.
11:11:01 [WS] Native Gateway startup status: gateway unhealthy, session running, readiness startup-eligible (gateway-mode-local).
11:12:27 [WS] The package-managed Gateway did not report a verified listener within 180 seconds of starting.
11:12:27 [WS] Rolling back the Gateway start requested by this attempt.
11:12:29 Native Gateway setup failed during StepVerify: NativeGatewayStartupTimeoutException

The exception identifies IsolatedGatewayRuntime.StartAndWaitAsync, then EnsureRunningCoreAsync, and NativeGatewaySetupSession.AuthorizeCoreAsync.

Gateway was still progressing immediately before rollback

From the newest launch log in openclaw-diagnostics-20261101-111309:

startup phase: cli.main.gateway-run-bootstrap 101604.0ms total=162436.5ms
13:12:11 loading configuration…
13:12:14 resolving authentication…
13:12:14 starting...
startup phase: cli.bootstrap.gateway-lock 11075.9ms total=177750.3ms
13:12:26 shutdown budget at startup: drain=315000ms shutdown=325000ms reserve=10000ms exitMargin=5000ms; source=Gateway stop policy=330000ms
startup phase: gateway.server-start-import starting total=177918.8ms

There is no gateway ready entry for this latest attempt before rollback. Logs also show long agent database activation/preparation and other bootstrap phases; they do not establish database corruption or a specific root cause for the slowness.

Expected behavior / request

Please review recovery behavior when a verified supervised launch remains alive and progresses beyond the default readiness window. Possible approaches include a longer documented budget or a resumable pending-start state, while preserving ownership checks and avoiding concurrent launches.

The current source exposes OPENCLAW_NATIVE_GATEWAY_START_TIMEOUT, but the normal GUI failure does not explain how a user should apply it and restart Companion safely. Clear GUI recovery guidance would help.

Related: #1903 concerns an already-starting native Gateway being rejected during automatic connection. This report concerns setup's explicit 180-second timeout followed by rollback.

Diagnostic handling

The complete local exports include configuration and backup files and are not uploaded publicly. The relevant error excerpts are included above. No tokens, credentials or personal paths are included in this report.

Activity

  1. added
    clawsweeper:intake:bug
    P0
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:ux-release-blocker
    issue-rating: 🦞 diamond lobster
    and removed
    clawsweeper:intake:bug
    on Nov 1, 2026
  2. clawsweeper commented on Nov 1, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    This issue establishes a current setup failure: main still stops an owned launch at the default readiness deadline, before the reported 210-second startup can finish; changing that deliberate limit needs maintainer judgment.

    Reproducibility: Current source and an existing deterministic test establish timeout followed by owned-start rollback; no tests or live Windows reproduction were run, and the reported 210-second startup remains reporter evidence.

    Maintainer decision needed

    • Question: Should native setup offer an explicit bounded longer retry, or raise the default startup allowance for slow supported installations?
    • Recommendation: Offer a bounded longer retry: Let users request more time inside setup, with coordinated outer deadlines and unchanged ownership checks.
    • Why: Current code, tests and documentation deliberately enforce rollback at the deadline, while existing recovery requires an environment change; the report does not determine the replacement timing policy.

    Next step
    Choose a bounded inline recovery policy, then establish a failing slow-start regression before implementing a Retry with more time action.

    Review details

    Best possible solution:

    Provide an inline Retry with more time action that preserves finite deadlines, cancellation, launch ownership and fresh listener verification.

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

    Current source and an existing deterministic test establish timeout followed by owned-start rollback; no tests or live Windows reproduction were run, and the reported 210-second startup remains reporter evidence.

    Is this the best way to solve the issue?

    A bounded in-product longer retry addresses the recovery gap without trusting log text as progress or removing rollback, but its allowance needs approval before changing the tested policy.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The latest failing Companion build and cause of the slow Gateway bootstrap remain unverified.
    • Package status and raw log phases do not establish a validated, attempt-bound progress signal suitable for extending deadlines.

    Codex review notes: model internal, reasoning medium; reviewed against a4dd026cc5f8.

    Label changes

    Label changes:

    • add P0: Native first-run setup is blocked on the reported supported installation, and increasing its readiness allowance requires an environment change and Companion restart outside the wizard.
    • add impact:ux-release-blocker: Retry setup repeats the same default deadline; the available in-product diagnostics and terminal launcher do not themselves recover the slow-start case.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.
    • add clawsweeper:needs-product-decision: Current issue advisory state selects this label.

    Label justifications:

    • P0: Native first-run setup is blocked on the reported supported installation, and increasing its readiness allowance requires an environment change and Companion restart outside the wizard.
    • impact:ux-release-blocker: Retry setup repeats the same default deadline; the available in-product diagnostics and terminal launcher do not themselves recover the slow-start case.
    Evidence reviewed

    What I checked:

    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 1, 2026, 6:34 AM ET / 11:34 UTC.

  3. larroy commented on Nov 3, 2026

    @larroy
    Collaborator

    Fix proposed in #1993 (fix(setup): native Gateway setup rolls back a slow but progressing start after 180 seconds).

    It raises the default native Gateway startup budget (IsolatedGatewayRuntime.DefaultStartupTimeoutSeconds) from 180 to 300 seconds. The credential handoff, setup connection phase, chooser verification and execution window deadlines derive from it and stay longer than the runtime's own ceiling, so setup no longer rolls back a start that becomes ready between 180 and 300 seconds. Ownership checks, rollback rules and fresh listener verification are unchanged, and OPENCLAW_NATIVE_GATEWAY_START_TIMEOUT still overrides the budget.

    • A fake-clock regression test replays this issue's timeline (start acknowledged at 90 s, unhealthy while polled, listener at 210 s). It failed before the fix with the same did not report a verified listener within 180 seconds message and now passes with no rollback.
    • Local build, Shared/Tray/SetupEngine/Connection tests and the MXC E2E pass on x64.

    Still needed: native setup on a slow ARM64 host with Store Gateway 2026.10.900.0, showing budget 300s in the setup log, readiness after more than 180 s, and no Rolling back the Gateway start entry.

    Longer term, a startup progress field in the package's gateway-service status --json would let Companion fail on lack of progress instead of a fixed budget; that would be an openclaw-windows-packaging change.

  4. locked as resolved and limited conversation to collaborators on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0clawsweeper:needs-maintainer-reviewclawsweeper:needs-product-decisionclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:ux-release-blockerissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions