Skip to content

fix: gateway remove and switch fail after setup is closed #1673

Closed

Description

@SebTardif

Setup writes the gateway list from its own registry. Closing the setup window without Open leaves the running tray on the old list, so Remove gateway and switching the active gateway fail until the tray is restarted.

The fix is on the fork. Creating the pull request from this account is refused (CreatePullRequest is forbidden, and the REST create returns 404). The branch and compare link are ready:

https://github.com/openclaw/openclaw-windows-node/compare/main...SebTardif:fix/f113-adopt-registry-after-setup?expand=1

  • Branch: SebTardif:fix/f113-adopt-registry-after-setup
  • Head: de2b9eb254cfe83fac329e647d4e416946be61eb

The commit adopts the saved list when setup closes and this session has no unsaved edits. A failed remove restores the row. A failed switch restores the previous active gateway and the connection page shows the error.

Local validation on that head: .\build.ps1 succeeded. Shared tests passed 4263 (33 skipped). Tray tests passed 3996. An isolated debug tray opened setup, a token-free gateway record was written beside it, and closing setup logged Gateway list refreshed after setup closed. That process had no TCP connection to port 18789.

Activity

  1. added
    P2
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    clawsweeper:source-repro
    impact:ux-friction
    issue-rating: 🦞 diamond lobster
    no-stale
    on Oct 7, 2026
  2. clawsweeper commented on Oct 7, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Current main still contains the stale-registry failure; the same author's open fixing PR explicitly closes this issue, so it should remain open pending that PR.

    Reproducibility: Source establishes the path: setup changes gateways.json through a separate registry, closing setup leaves the tray baseline unchanged, and subsequent removal or switching reaches the stale-save rejection; existing tests establish that rejection mechanism, but were not run here.

    Next step
    Review the existing repair in #1864 (fix: gateway remove and switch fail after setup is closed), resolve its outstanding validation, and let its merge close this issue.

    Review details

    Best possible solution:

    Land guarded setup-close registry reconciliation with transactional gateway actions through the existing fixing PR.

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

    Source establishes the path: setup changes gateways.json through a separate registry, closing setup leaves the tray baseline unchanged, and subsequent removal or switching reaches the stale-save rejection; existing tests establish that rejection mechanism, but were not run here.

    Is this the best way to solve the issue?

    Guarded adoption after cleanup addresses the cause while preserving unsaved edits, persistence conflict checks, and connection ownership; the linked PR already owns this approach and should be reviewed rather than duplicated.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No current-main runtime reproduction was executed during this read-only review.
    • The linked PR explicitly leaves latest-stable upgrade preservation of saved gateways and identities unverified.

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

    Label changes

    Label changes:

    • add clawsweeper:linked-pr-open: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • remove clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.
    • remove clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.

    Label justifications:

    • P2: Saved-gateway removal and switching fail after setup closes, with restarting the tray providing recovery.
    • impact:ux-friction: The stale catalog makes gateway actions fail or appear successful until the tray reloads.
    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 October 24, 2026, 9:40 AM ET / 13:40 UTC.

  3. clawsweeper commented on Oct 7, 2026

    @clawsweeper

    🦞⚠️
    Automatic implementation stopped before completion.
    Reason: The automatic implementation worker stopped before all deterministic gates completed. Open the workflow run for the exact blocker.
    Worker: https://github.com/openclaw/clawsweeper/actions/runs/37689718805

  4. added
    clawsweeper:intake:bug
    clawsweeper:intake:needs-environment
    clawsweeper:intake:needs-repro
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    and removed
    clawsweeper:queueable-fix
    clawsweeper:fix-shape-clear
    no-stale
    clawsweeper:intake:bug
    clawsweeper:intake:needs-environment
    clawsweeper:intake:needs-repro
    on Oct 24, 2026
  5. github-actions commented on Nov 8, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  6. locked as resolved and limited conversation to collaborators on Nov 14, 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

    P2clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:ux-frictionissue-rating: 🦞 diamond lobsterstale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions