Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Gateway-hosted wizard sessions inherit CLI process and service-lifecycle behavior: a wizard exit can terminate the shared Gateway process, and a client that already installed the Gateway service cannot tell onboarding not to install it again.
Steps to reproduce
- Install and start a Gateway service from an external client such as the Windows Companion.
- Start the native setup wizard through the Gateway
wizard.startRPC without aninstallDaemonparameter. - Continue through onboarding until the service-install/finalization path runs.
- Observe the RPC session lose its hosting Gateway when the CLI-oriented wizard calls
runtime.exit(); the client cannot declare that it already owns daemon installation.
The Windows Companion setup E2E reproduces this with the official OpenClaw 2026.7.2-beta.2 package: all three setup/recovery shards lose the Gateway during the shared wizard fixture before their scenario-specific assertions run.
Expected behavior
- Gateway RPC wizards run as embedded sessions and cannot terminate their hosting Gateway process.
- Exit code zero completes the wizard session; nonzero exits are reported as session errors.
- The RPC caller can explicitly set
installDaemon: falsewhen it already owns service installation. - The CLI wizard keeps its existing standalone lifecycle behavior.
Actual behavior
The Gateway passes the normal exiting runtime to CLI-oriented setup and channel wizard runners. The setup RPC schema also has no caller-controlled daemon-install flag, so omitted configuration follows onboarding defaults and may attempt service installation even when the client already completed that step.
OpenClaw version
Official package 2026.7.2-beta.2; source behavior confirmed on current main while preparing the fix.
Operating system
Windows 11 host with Companion-owned OpenClawGateway WSL distribution; the owner-boundary defect is in the Gateway RPC path and is not Windows-specific.
Install method
Windows Companion managed WSL Gateway setup using the official OpenClaw package.
Model
N/A; the failure occurs during setup before model selection.
Provider / routing chain
N/A; Windows Companion -> Gateway RPC -> native onboarding wizard.
Additional provider/model setup details
N/A.
Logs
The client loses the Gateway connection while the native wizard is running. The downstream setup-connect, revocation-recovery, and network-recovery E2E shards fail at the same shared wizard fixture.Screenshots, recordings, and evidence
- Candidate process-lifecycle fix: fix(gateway): isolate wizard exits from shared process #110382
- Superseded daemon-control candidate to be consolidated: fix(gateway): let wizard clients control daemon installation #109412
- Windows Companion consumer and exact failed-first E2E context: fix(setup): validate current OpenClaw package lifecycle openclaw-windows-node#999
- Windows release-alignment tracker: Keep Windows Companion aligned with current OpenClaw stable and beta releases openclaw-windows-node#1000
Impact and severity
- Affected: remote setup clients embedding the native Gateway wizard, currently reproduced through the Windows Companion.
- Severity: high for onboarding because the hosting Gateway disappears before setup completes.
- Frequency: deterministic in the observed official beta.2 Companion E2E path.
- Consequence: fresh setup and recovery flows cannot complete, and clients cannot cleanly retain service-lifecycle ownership.
Additional information
The two symptoms share one owner boundary: an RPC-hosted wizard must be an embedded session rather than a standalone CLI process. The intended fix is one bounded Gateway change that supplies a non-exiting runtime and projects an optional installDaemon request field. The Windows Companion will then send installDaemon: false because it installs the service earlier in its own setup pipeline.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 18, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 18, 2026, 3:53 AM ET / 07:53 UTC.
Summary
Keep this issue open as the canonical report: current
mainstill passes the process-exiting CLI runtime into both Gateway wizard flows, and the two linked open pull requests are complementary candidate fixes rather than merged resolution.Reproducibility: yes. in source:
wizard.startsuppliesdefaultRuntimeto runners whose setup path callsruntime.exit(), which reachesprocess.exit; a focused live Gateway RPC run is still needed as regression proof after the fix.Root-cause cluster
Relationship:
canonicalCanonical: #110545
Summary: This issue is the canonical umbrella for one Gateway RPC owner-boundary defect with two complementary open candidate fixes.
Members:
fixed_by_candidate: fix(gateway): isolate wizard exits from shared process #110382 - It proposes the non-exiting runtime and exit-status handling required to stop an RPC wizard from terminating its Gateway host.fixed_by_candidate: fix(gateway): let wizard clients control daemon installation #109412 - It proposes forwarding the existing optionalinstallDaemononboarding option through the Gateway wizard-start contract.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
Two open linked pull requests already own the concrete repair slices, so a separate automated fix branch would duplicate active contributor work.
Review details
Best possible solution:
Consolidate the two complementary fixes into one bounded Gateway change: run both RPC wizard flows with a non-exiting runtime, translate only
ExitError(0)to normal completion, surface nonzero exits as session errors, and forward optionalinstallDaemonunchanged.Do we have a high-confidence way to reproduce the issue?
Yes in source:
wizard.startsuppliesdefaultRuntimeto runners whose setup path callsruntime.exit(), which reachesprocess.exit; a focused live Gateway RPC run is still needed as regression proof after the fix.Is this the best way to solve the issue?
Yes, if handled as one Gateway owner-boundary repair: reuse the existing non-exiting runtime and forward the already-defined onboarding option rather than adding Companion-specific behavior or changing CLI lifecycle semantics.
AGENTS.md: unclear because the file could not be read completely.
Remaining risk / open question:
installDaemon: false; landing only the protocol projection would still allow an embedded wizard to terminate its Gateway host.true, and explicitfalsewithout changing standalone CLI onboarding behavior.Codex review notes: model internal, reasoning high; reviewed against 09963412d170.
Label changes
Label changes:
P0: A first-run Windows Companion setup path deterministically loses its hosting Gateway before onboarding can complete.impact:crash-loop: The embedded wizard can invoke the normal runtime exit path and terminate the shared Gateway process.impact:ux-release-blocker: Affected companion users cannot complete fresh setup or recovery through the client’s expected wizard flow.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.Label justifications:
P0: A first-run Windows Companion setup path deterministically loses its hosting Gateway before onboarding can complete.impact:crash-loop: The embedded wizard can invoke the normal runtime exit path and terminate the shared Gateway process.impact:ux-release-blocker: Affected companion users cannot complete fresh setup or recovery through the client’s expected wizard flow.Evidence reviewed
What I checked:
wizard.startinvokes both the setup and channel wizard runners withdefaultRuntime; itsexitimplementation callsprocess.exit, so an embedded wizard can terminate its host process. (src/gateway/server-methods/wizard.ts:4, 09963412d170)createNonExitingRuntime(), which converts an exit intoExitError(code)instead of exiting the process; this is the appropriate Gateway session boundary primitive. (src/runtime.ts:2, 09963412d170)runtime.exit(1)for invalid configuration andruntime.exit(0)after a launched TUI, confirming that passing the normal CLI runtime into an RPC-hosted session is behaviorally unsafe. (src/wizard/setup.ts:3, 09963412d170)OnboardOptionsalready includes optionalinstallDaemon, so forwarding it through the Gateway RPC projection is a missing propagation of an existing option rather than a new configuration surface. (src/commands/onboard-types.ts:6, 09963412d170)modeandworkspaceto the wizard runner, leaving no path for an RPC caller to preserve explicitinstallDaemon: false. (src/gateway/server-methods/wizard.ts:4, 09963412d170)Likely related people:
installDaemonRPC projection. (role: related-fix author; confidence: medium; commits: 79fcd377c754, 90dc7533822f; files:src/gateway/server-methods/wizard.ts,src/runtime.ts,src/commands/onboard-types.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.obviyus commentedon Jul 30, 2026
Fixed on
main.Both halves of this are addressed:
runHostedWizardnow runs undercreateNonExitingRuntime()(src/gateway/server-methods/wizard.ts:50), soruntime.exitraisesExitErrorinstead of callingprocess.exitand can no longer take the Gateway down with it.installDaemonis now part of the wizard RPC surface and is projected throughwizard.start(src/gateway/server-methods/wizard.ts:124), so an RPC caller can decline daemon installation rather than inheriting the CLI's service behavior.Closing as fixed. If you see a hosted wizard path that still terminates the Gateway process, reopen with the RPC method and the exit route — that would be a distinct escape from the non-exiting runtime rather than this issue.