Repository navigation
fix(setup): Start with Windows cannot stop the installer startup shortcut - #1964
roboclaw-bot wants to merge 9 commits into
Conversation
…tcut Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: 3e33e2c1-2ae8-488b-8832-0a55e560acf7
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: 9b227027-804f-4ed1-8309-902f6995b813
|
Codex review: blocked before merge. What this changesThe PR replaces installer startup shortcuts with Companion-managed Run registration and migrates eligible existing shortcuts. Example: An enabled OpenClaw Companion.lnk targets C:\Apps\OpenClaw\OpenClaw.Tray.WinUI.exe, while AutoStart=false.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: current main and the latest release retain the unmanaged startup shortcut, and the proposed repair remains useful. No new actionable code defect was found; the documented legacy unquoted-command case makes this a partial fix. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Inno installer creates or migrates Windows logon registrations; AutoStartManager and AutoStartReconciliation connect those registrations to the persisted Settings toggle. flowchart TD
A[Installer startup choice] --> B[Managed Run registration]
C[Legacy startup shortcut] --> D[Ownership and approval checks]
D --> B
B --> E[Startup reconciliation]
E --> F[Settings preference]
F --> G[AutoStartManager]
G --> B
Technical reviewBest possible solution: Keep installer startup under the existing managed registration, preserve disabled and customized entries, and track the documented unquoted-command remainder separately. Do we have a high-confidence way to reproduce the issue? Current-main source establishes that installer-created shortcuts survive both managed disable paths; the linked report supplies installer observations, while this review executed no target code. Is this the best way to solve the issue? Using the existing Run registration addresses the ownership mismatch directly, and the retained ownership, approval and variant checks are necessary migration safeguards rather than parallel machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a0a2a24ec1dd. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)Reviewed November 17, 2026, 8:35 AM ET / 13:35 UTC (Revision 4). |
Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: 94f453e4-324e-40d9-84e0-55b6bf96ab81
Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: 702bb2f8-2cce-4041-96a6-7b8e625c212a
Co-authored-by: MertBasar0 <[email protected]>
Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: 8004c27e-9f7e-4dd3-9762-1f3243209285
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: b7d5827c-4d7c-4715-8e78-810f8d1ff373
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
PR cleanup reviewReviewed head: The latest ownership guard correctly checks the actual shortcut target and arguments before migration, and main still has the original unmanaged-shortcut gap. This is not ready to land yet: the body retains S05 positive logon, S18 wizard and customized-shortcut installer gaps, plus the explicitly excluded unquoted Run-command case. The current UI job also crashes rather than completing. Please keep those boundaries visible while completing the existing proof lane. Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass. |
|
Hi @MertBasar0, this is a Copilot triage agent (not Scott), doing an overnight sweep for PRs that could land. I made no changes to this branch. Thank you for the thorough, checksummed Windows evidence on "Start with Windows" (#1956). What I checked against current
No pressure on timing. A refreshed head with a green Gate plus those two cases would make this much easier for a maintainer to land. |
Co-authored-by: MertBasar0 <[email protected]>
Worked on by: - @MertBasar0 Co-authored-by: MertBasar0 <[email protected]> OpenClaw-Publication: 46348e85-a43f-4578-8126-3c351263e8a5
|
S05 (positive logon) at I ran S05 on the current head (Windows 11 Home 26200, Dev identity, installer built from
S05 stays not verified. The value Companion writes is correct, but no logon launch has been observed yet. @Speculorum9, if you have time, could you run this positive logon check on your machine? Same overlay approach as before, on an Inno install:
A short note with the step 3 value, the step 5 result and the line from On CI: the red jobs on |
|
@MertBasar0: S05 (positive logon) passed on my machine, so it can be marked verified from a second system. Build: artifact Machine: Windows 11 Home 10.0.26300, x64, Inno install at Step 3 (Run value). Before I touched the toggle, the existing value was unquoted: I turned Start with Windows Off and On again (a "Saved" popup each time). The value then became: There is no StartupApproved entry. Step 4. I closed Companion from the tray, then restarted Windows, and did not start it myself. Step 5. Companion started on its own about 90 seconds after the restart (it came up after the other tray apps), running in the tray without a window. The event query shows:
Companion on this machine is still running this build. I can roll back to the signed build whenever you tell me to, or test another head first. |
|
@Speculorum9 thank you, that closes S05 from a second machine. The Run value written by Your step 3 also confirms a boundary the PR already lists: the value that was there before was the older unquoted form ( I'll update the PR body with your S05 result next to my host-blocked attempt. S18 (the setup wizard and a customized startup shortcut through the installer) is still open, and I'll post separate steps for it if we can make it a small check. You can roll back to the signed build whenever you like. Thanks again! |
|
Correction to my S05 report above (#1964 (comment)) and to the earlier S06 PASS from my machine. The cause was my test setup, not Windows and not this PR. The agent that drove these runs is started by the Claude desktop app, which on my machine is an MSIX package. Every process it started (the installer, Companion, and my scripts, including the one that wrote the control entry) inherited the package context, so their writes under I confirmed this on 2026-11-13 from a scheduled task, which runs outside the package: the Dev install folder and the Dev uninstall key (an What this means for #1964:
I'll rerun S06, and S05 on my side, with the installer and Companion started outside the package, and update the PR body to match. Sorry for the noise. |
|
S05 and S06 were rerun at Setup. Every install, launch and state read was done by a process outside the package.
Side note: with no Before logon 2:
S05 PASS (logon 2):
Prep C: Mert turned Start with Windows Off in that logon-started Companion. The Run value was removed. There was still no task and no shortcut, and the stored value was S06 PASS (logon 3):
Afterwards, the Dev build was uninstalled outside the package. The Release install was not touched. Still open: S18 (the setup wizard path), the signed upgrade pools, and the other items under "Not verified or blocked". |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks for the re-review. Here's a summary of where this stands at head
|
|
Result for the unquoted legacy Setup: Windows 11 Home, Companion file version
So the On-then-Off recovery does not clear this state: both startup entries survive it and the original symptom remains. Limits: both entries were active on each restart, so I can't say which one launched the Companion. This is one machine, and the starting state was recreated by hand, not left by an installer. I can run a round with the shortcut moved aside if that would help. |
|
@Speculorum9 thank you for the Finding 4 round. It found a real gap: the unquoted Run value plus the shortcut survives the upgrade too, not only the On/Off toggle. Row F8 below reproduces it, and the second commit fixes it at upgrade. Where the fix is. Two commits on top of this PR's head Latest-stable upgrade proof for the data-model compatibility item: How it was run.
Logon (after a restart) with the fixed build, F1 state.
Validation of the fix.
Not covered.
|
Closes #1956
Original fix by @MertBasar0. Current evidence: Mert's checksummed Windows report at e4affd6. Metadata-only update; no new commit.
Not merge-ready. S05 passed on two machines and S06 passed on a rerun outside the Claude desktop package; S18 is still open; Finding 4 is explicitly out of scope.
What Problem This Solves
Fixes: Companion keeps starting at logon after Start with Windows is turned off, when the installer's startup task was selected.
User Impact
User impact: the installer's startup choice uses the registration Settings manages. The tested migrated path can be turned Off and stays Off through same-version repair. Existing unquoted Run entries remain a limitation (Finding 4 below).
Behavior to review:
trueonly for this executable's enabled installer Run command. Scheduled-task presence alone never enables an Off preference. It never lowers an enabled preference.Why This Change Was Made
Old owner:
installer.isscreated a{userstartup}shortcut that no other code reads or removes. New owner: theHKCU\...\Runvalue thatAutoStartManageralready reads and deletes. Legacy migration still requires an existing owned, argument-free entry. Only its Run output quoting changed; task migration, ordering, approval guards and uninstall remain unchanged.Evidence
Windows 11 Home build 26200, x64, tr-TR, unsigned Dev build at e4affd6. Candidate installer SHA-256: AAC2ED073D911329AEEAB86768E5FE777CABF4767547D5F58B5C83BA08197599. Baseline: a4dd026.
The agent reports full installed/publish hash matches for the executable and managed DLLs; displayed hashes are shortened. Dev identity verified. S04 is not logon or future-release upgrade proof.
Shortcut-ownership P2 follow-up
At 0700f09, StartupShortcutIsInstallerOwned reads the .lnk through WScript.Shell before any Run write or shortcut deletion. Only this installation's executable with no arguments or exactly --background is migrated; retargeted, customized-argument and unreadable links are preserved and logged. The published tree is identical to Mert's 1cbd43b/7cc96f55 candidate. Mert reports Windows 11 validation: the new regression fails on ff34116 and InstallerIssAssertionTests passes 26/26; build.ps1 succeeds; Tray 5082/5082; Shared 4924 passed with two reported host-only failures (tr-TR casing and symbolic-link privilege); Test-InstallerScriptCompiles.ps1 -RequireCompiler compiles x64, arm64 and DevBuild. A real .lnk WScript.Shell probe accepted original no-argument/--background links and rejected retargeted, extra-argument, corrupt and missing links, including corrupt links returning empty TargetPath. Live installer runs of the customized-shortcut cases were not performed. These native results are supplied by Mert, not newly executed in this publication turn.
Change Type
Scope
winnodeRequired proof pools
windows-clean-installer-upgrade: the install and upgrade path changed. Not run here; it needs exact signed artifacts.windows-winui-interactive: the value the Settings toggle shows can change at startup. Not run here.Validation
Refreshed onto main
96f3b25f(MertBasar0, Windows 11 Home 26200)Merged current
maininto0700f09fwithout conflicts; the diff againstmainis still the same seven files. On the merge result:./build.ps1passes. Shared tests: 5833 passed, 13 failed, 30 skipped. Tray tests (isolated data directory): 6366 passed, 1 failed. All 14 failures are host-specific and fail identically on unmodifiedmainon the same machine: 12 need the symbolic-link privilege (MxcFolderAdmissionTests,MxcOwnedOperationTests,InstalledFileWorkerResolverTests), 1 compares this machine's name casing (ExecReusableCommandBinderTests.PinnedCarrier_IgnoresShadowInsertedAfterApproval), and 1 isFileWorkerManifestTests.ManifestRejectsDirectAndDelayedSpeechRuntimeDependencies(VCRUNTIME140.dll). None of them touch the files this PR changes.Local merge of e4affd6 with main 4aee38a (Windows 11 build 26200): build.ps1 exit 0; Tray tests 5081 passed, 0 failed; Test-InstallerScriptCompiles -RequireCompiler compiles x64, arm64 and x64 DevBuild; Shared tests 4924 passed, 2 failed (the same two host-only failures as before: no symlink privilege, and ExecReusableCommandBinderTests.PinnedCarrier_IgnoresShadowInsertedAfterApproval). The handshake test that failed in CI passes.
User-provided native Windows results at e4affd6
Earlier agent-side checks: 49 focused Linux passes, pre-fix regression failure, clean diff and P0-P3 review; real Inno under Wine compiled three variants. Full Linux suites did not pass. These are separate runs, not an all-green claim.
Real Behavior Proof
Current-head scope
Current cases were reset and rerun at e4affd6; older SHA results remain historical. Mert performed the clicks; UI Automation read toggle states, without screenshots. The S00 log's FAIL line was a closed-window read, not a demonstrated product failure; visible Off was not captured in that baseline case.
With Mert's approval, click cases used EnableMcpServer=true in Dev settings to bypass first-run setup in local-only mode. No Gateway, pairing or credentials were used; this differs from a default profile. Isolation/fixture variables were checked in the launching process tree, not independently in the child. No -Isolated autostart proof is claimed.
S01/S02/S09/S10/S13/S19 and S12-A passed. S14/S15 and S12-D/E/F are labeled fixture proof. S07/S08/S12-B/C fixtures do not fulfill Windows-UI state creation. Uninstall removed a retained shortcut but left Windows-owned approval metadata; this is an observation, not a new failure.
All other cases run on MertBasar0's machine (S00, S03, S04, OBS-494 and the session checks above) ran inside the Claude desktop MSIX package context; only the S05/S06 reruns above ran outside it. They show what the installer and Companion wrote and read in that view; they are not evidence of what Windows itself sees at logon. Correction
Not verified or blocked
Release state and distros were reported preserved. Evidence is supplied report/log excerpts; public screenshot/artifact links verified: N/A.
Finding 4: known limitation, explicitly out of scope
An already unquoted owned Run command with --background is not normalized. With a no-space path and stored AutoStart=false, upgrade/launch leaves it active and the stored toggle value False. If an enabled legacy shortcut exists too, both remain because the destination fails exact-command comparison. The original symptom can therefore remain for these users.
This PR stops the corrected argument-free migration from creating that form; it does not repair existing argument-bearing entries. Frequency is unknown. Finding 4 is excluded by agreed scope, not claimed fixed. Suggested On-then-Off recovery was not tested and may leave the shortcut. No new commit was made for it.
Observed on Speculorum9's machine at a511d24: the existing OpenClawTray value was the unquoted form (\OpenClaw.Tray.WinUI.exe --background). Turning Start with Windows Off and then On replaced it with the quoted command. This is a manual toggle, not the untested On-then-Off recovery above, and it does not change Finding 4's scope.
Not merge-ready. S18 and the other stated gaps remain open.
Security Impact
No)No)No)No)No)Yes, explain the risk and mitigation:Compatibility and Migration
Yes)No)No)Review Conversations
Worked on by
Work sessions
Linked for team reference; these sessions aren’t public.