Repository navigation
[Bug]: Store uninstall leaves managed Gateways behind and reinstall does not refresh them #1712
Description
Bug
Windows Settings uninstall leaves Companion-managed Gateways installed. Reinstalling the latest Store Companion does not ensure that the retained Gateway is current and compatible, making reinstall ineffective as a recovery step.
Reproduction
- Install Store Companion with an existing app-managed local Gateway.
- Uninstall Companion through Settings > Apps > Installed apps and inspect the Gateway.
- Reinstall the current Store Companion, launch it, and inspect the Gateway version again.
Actual behavior
Observed on Windows 11 ARM64, build 28000.2525:
| Stage | Store Companion | WSL Gateway CLI |
|---|---|---|
| Before uninstall | 2026.9.803.0 | 2026.9.8 |
| After uninstall | Package absent | 2026.9.8, distro retained |
| After reinstall and launch | 2026.9.803.0 | 2026.9.8, unchanged |
A separate Store Gateway MSIX 2026.9.900.0 also survived Companion removal. It was acquired directly through WinGet because native onboarding was unavailable on the test host.
This used a pre-existing WSL Gateway. Full Gateway reprovisioning and a two-version Store Companion upgrade were not exercised.
The inspected native setup path skips acquisition for an installed package and disables WinGet upgrades:
Expected behavior
- Windows Settings uninstall automatically removes Companion-managed Gateway installations and their owned artifacts. Preserve Gateways outside Companion's ownership.
- Installation/reinstallation checks Gateway version and compatibility and updates outdated managed Gateways before reuse.
- Validate WSL and native paths, uninstall while Companion is closed, and application updates that must preserve the Gateway.
Related
#1691 ([Bug] Companion cannot connect: Gateway MSIX missing isolated-session contract) reports a compatibility failure after Companion reinstall with a retained Gateway.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
joelagnel commentedon Oct 12, 2026
Reproduction screenshots from the Windows 11 ARM64 test machine:
After Windows Settings uninstall, the production Companion is absent and the separately installed Store Gateway remains. The native Gateway was acquired directly through WinGet, so this image shows independent package retention.
After reinstalling and launching Store Companion 2026.9.803.0, the pre-existing WSL Gateway still reports 2026.9.8.
The WSL reinstall behavior is confirmed: Gateway stayed at 2026.9.8, although 2026.10.2 was available and ran from a separate temporary installation on the Windows 11 ARM64 test machine.
This confirms that reinstalling and launching Companion does not automatically refresh the retained WSL Gateway. The test used the same current Store Companion version; a two-version Companion upgrade, the native Gateway update case, and full WSL setup remain unverified.
clawsweeper commentedon Oct 12, 2026
Codex review: this still needs some work.
Summary
Keep open for a lifecycle decision: current main does not implement the requested behavior, but retention and skipping healthy-package upgrades are documented choices rather than a demonstrated compatibility defect.
Reproducibility: The inspected screenshots and current source establish retention and deliberate native-package reuse; they do not establish a current-main compatibility failure or failure of full Gateway provisioning.
Maintainer decision needed
Next step
Decide the retention and cleanup contract, then establish an incompatible retained-Gateway regression to scope a data-preserving Diagnose/Fix action.
Review details
Best possible solution:
Provide a data-preserving Diagnose/Fix action for retained Gateways and explicit ownership-aware removal before attempting automatic cleanup.
Do we have a high-confidence way to reproduce the issue?
The inspected screenshots and current source establish retention and deliberate native-package reuse; they do not establish a current-main compatibility failure or failure of full Gateway provisioning.
Is this the best way to solve the issue?
Automatic deletion and upgrading are not yet justified; separate data-preserving compatibility recovery from ownership-aware removal and decide the lifecycle contract before implementation.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 16299381a4df.
Label changes
Label changes:
P2: Retention and reinstall expectations create a concrete recovery concern, but this issue does not demonstrate blocked chat, data loss, or incompatible execution.impact:ux-friction: Removing and reinstalling Companion can leave users confused about retained Gateways, and native refresh guidance currently requires a terminal command.issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.clawsweeper:needs-product-decision: Current issue advisory state selects this label.Label justifications:
P2: Retention and reinstall expectations create a concrete recovery concern, but this issue does not demonstrate blocked chat, data loss, or incompatible execution.impact:ux-friction: Removing and reinstalling Companion can leave users confused about retained Gateways, and native refresh guidance currently requires a terminal command.Evidence reviewed
What I checked:
docs/uninstall-msix.md:8, 16299381a4df)src/OpenClaw.Tray.WinUI/Pages/SettingsPage.xaml:483, 16299381a4df)src/OpenClaw.SetupEngine/NativeGatewayPackageAcquisition.cs:37, 16299381a4df)docs/ONBOARDING_WIZARD.md:201, 16299381a4df)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 explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 12, 2026, 4:50 PM ET / 20:50 UTC.
joelagnel commentedon Oct 15, 2026
Fixed by merged PR #1715 (fix(setup): clean up owned Gateways after Companion uninstall), merge commit
62752f44cda2f92e44c9fc2dd42f6415a65c1884.The merged change adds ownership-aware cleanup after Windows Settings uninstall, selective connection/authentication reconciliation after reinstall, recovery when cleanup cannot safely proceed, and native Store Gateway update checks. Independently installed, replaced, uncertain, or shared Gateways are preserved under the documented ownership rules.
Validation on Windows 11 ARM64 passed the full build and Shared/Tray/SetupEngine suites, controlled ownership regressions, and real signed-MSIX/WSL update/uninstall/reinstall checks. Published lifecycle/recovery proof and detailed validation limits are in the merged PR.
Closing as completed. The separately reported native Local AI runtime failure remains tracked in #1713; merged PR #1716 (fix(setup): preserve sanitized Local AI verification errors) improves its diagnostics.