Skip to content

Accept forwarded launches and deep links before the startup update prompt #2073

Closed

Description

@shanselman

Lane 3 of 5 for #2071. Filed by a Copilot agent.

Problem:

  • The single-instance mutex is taken early (App.xaml.cs ~600), but the forwarded-activation listener starts only at ~1107. That is after onboarding and after CheckOrdinaryStartupUpdateAsync, which awaits UpdateDialog with no timeout.
  • A second launch (Start menu, openclaw:// link, or the installer's migration-shutdown message) retries the pipe for about 5 s, ignores the result, and exits.
  • Result in unpackaged release builds with an update available:
    • relaunching does nothing
    • deep links are dropped
    • the global hotkey is dead until the dialog is answered

Related: _globalHotkey has two writers. Startup (_globalHotkey = new GlobalHotkeyService() at ~1112) overwrites a hotkey that a settings save already registered during that wait. That leaves an orphaned registration that disabling the hotkey cannot remove.

Fix:

  • Start the listener before the update check. Forwarded plans already marshal to the UI thread.
  • Register the hotkey through ApplyGlobalHotkey, so it has a single writer.

Done when:

  • AppRefactorContractTests.Startup_Order_PreservesInitializationInvariants requires the listener before the update check (it currently pins the old order)
  • a contract test forbids the direct hotkey construction
  • the required validation passes

Related closed issue: #1218.

Activity

  1. self-assigned this
    on Nov 8, 2026
  2. added
    lever
    on Nov 8, 2026
  3. added
    clawsweeper:intake:bug
    clawsweeper:intake:needs-environment
    clawsweeper:intake:needs-repro
    P2
    clawsweeper:source-repro
    impact:ux-friction
    issue-rating: 🦞 diamond lobster
    and removed
    clawsweeper:intake:bug
    clawsweeper:intake:needs-environment
    clawsweeper:intake:needs-repro
    on Nov 8, 2026
  4. clawsweeper commented on Nov 8, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Current main still delays activation IPC and hotkey registration behind the update prompt, and startup can overwrite an existing hotkey service; this collaborator-authored issue remains actionable.

    Reproducibility: Source establishes the failure: leave an ordinary unpackaged Release update prompt unanswered, then launch again or send openclaw://settings; the listener has not started and forwarding exhausts its retries before the secondary process exits. No live reproduction or tests were run.

    Next step
    Within the existing maintainer audit lane, fix startup ordering and hotkey reuse after establishing failing regressions for activation during a held update prompt and hotkey disable after an intervening settings save.

    Review details

    Best possible solution:

    Initialize activation reception and hotkeys once their dependencies are ready, before awaiting the update prompt, while preserving existing routing and shutdown ownership.

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

    Source establishes the failure: leave an ordinary unpackaged Release update prompt unanswered, then launch again or send openclaw://settings; the listener has not started and forwarding exhausts its retries before the secondary process exits. No live reproduction or tests were run.

    Is this the best way to solve the issue?

    The proposed ordering repair and reuse of ApplyGlobalHotkey fit the existing owners; regression coverage must also retain native setup receipt bypass, installer-exit handling, current-user IPC, confirmation, and orderly shutdown.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No native Windows run exercised an unanswered release update prompt or the settings-save hotkey interleaving during this read-only review.

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

    Label changes

    Label changes:

    • add P2: The source-proven defect affects startup activation in unpackaged release builds with an outstanding update prompt, with an in-product recovery through closing or answering that prompt.
    • add impact:ux-friction: Start-menu launches and deep links silently fail during the prompt, and hotkeys can remain registered after disabling them when startup replaces a previously registered service.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.

    Label justifications:

    • P2: The source-proven defect affects startup activation in unpackaged release builds with an outstanding update prompt, with an in-product recovery through closing or answering that prompt.
    • impact:ux-friction: Start-menu launches and deep links silently fail during the prompt, and hotkeys can remain registered after disabling them when startup replaces a previously registered service.
    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 8, 2026, 1:28 AM ET / 06:28 UTC.

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

Metadata

Metadata

Assignees

Labels

P2clawsweeper:source-reproimpact:ux-frictionissue-rating: 🦞 diamond lobsterlever

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions