Repository navigation
Open
5 / 55 of 5 issues completedLabels
P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.impact:session-stateThis issue is about session, memory, transcript, context, or agent state drift.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.leverLever delivery tracking issue
Description
Filed by a Copilot agent (not Scott) from an implicit state machine audit.
Goal: fix the races and stale state found by a two-pass audit of implicit state machines. Each finding was checked against the code at e70292487. Autonomy L2: an agent opens ready PRs and a human lands them.
Done when: each lane below has a merged PR with a deterministic regression test that fails before the fix, and ./build.ps1 plus the Shared and Tray test suites pass.
| # | Lane | Severity | Files |
|---|---|---|---|
| 1 | Run disconnect cleanup on every connection loss | Medium | WebSocketClientBase.cs, OpenClawGatewayClient.cs |
| 2 | Make MCP server start and stop atomic in NodeService | Medium (security-adjacent) | NodeService.cs |
| 3 | Accept forwarded launches before the startup update prompt | Medium (unpackaged release) | App.xaml.cs, ActivationRouter.cs |
| 4 | Stop queued reconnects from reviving a disconnected gateway | Low-Medium | GatewayConnectionManager.cs, ConnectionPage.xaml.cs |
| 5 | Give the cron safety timer a per-run token | Low | CronPage.xaml.cs |
No two lanes change the same file. PRs will be opened one at a time.
Deferred (Low or Info, no lane):
- design smell in the WindowsNodeClient pairing flags
- the auto-repair monitor's literal timeout
- a possible double keepalive spawn
- the update dialog can install a different release
- a duplicate hatching message
- a dropped LocalAI resume
- the hotkey registering after a timeout has reported failure
- the dead
NavigateAndWaitAsync _protocolMismatchnever resetting- the post-handshake burst not being tied to a connection generation
- startup continuing after Exit
Judged safe:
- GatewayConnectionManager core and ConnectionStateMachine
- ExecApprovals, the MXC runner, migration and the gateway runtimes
- the pairing queue and McpHttpServer
- ConnectionPage, WorkspaceWindow and the shutdown coordinator
- chat and setup
Reacted by clawsweeper
Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.impact:session-stateThis issue is about session, memory, transcript, context, or agent state drift.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.leverLever delivery tracking issue
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsBacklog
Activity
clawsweeper commentedon Nov 8, 2026
Codex review: this still needs some work.
Summary
Keep this issue open: current main retains the reported lifecycle defects, and this collaborator-authored umbrella tracks five unresolved child issues.
Reproducibility: Current source establishes the missing cleanup, unsynchronized listener ownership, activation ordering, reconnect check/acquire gap, and timer identity defect; existing tests pin parts of that behavior, but no live reproduction ran.
Next step
Keep this collaborator-authored umbrella with its five child issues, establish failing regressions per lane, and require explicit MCP revocation proof before accepting that repair.
Security
Needs attention: The MCP lane concerns listener revocation after disable and needs security-conscious lifecycle validation.
Review details
Best possible solution:
Complete the five focused child repairs with deterministic regressions and current-head proof while retaining the existing lifecycle owners.
Do we have a high-confidence way to reproduce the issue?
Current source establishes the missing cleanup, unsynchronized listener ownership, activation ordering, reconnect check/acquire gap, and timer identity defect; existing tests pin parts of that behavior, but no live reproduction ran.
Is this the best way to solve the issue?
Separate repairs fit these distinct defects, provided each first establishes a failing regression and preserves authentication, shutdown drain, activation ownership, and connection-generation checks.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against e70292487958.
Label changes
Label changes:
P2: These bounded lifecycle defects warrant repair, without evidence of an emergency outage or blocked first-use flow.impact:security: Concurrent MCP lifecycle operations can undermine the user's expectation that disabling MCP removes its listener.impact:session-state: Skipped disconnect cleanup leaves handshake/session metadata stale and pending requests uncleared until later recovery.impact:ux-friction: Startup forwarding can expire during update prompting, and old cron timers can misrepresent a newer run.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:needs-security-review: Current issue advisory state selects this label.Label justifications:
P2: These bounded lifecycle defects warrant repair, without evidence of an emergency outage or blocked first-use flow.impact:security: Concurrent MCP lifecycle operations can undermine the user's expectation that disabling MCP removes its listener.impact:session-state: Skipped disconnect cleanup leaves handshake/session metadata stale and pending requests uncleared until later recovery.impact:ux-friction: Startup forwarding can expire during update prompting, and old cron timers can misrepresent a newer run.Evidence reviewed
Security concerns:
src/OpenClaw.Tray.WinUI/Services/NodeService.cs:819An overlapping start can publish after disable has observed no server, or a failed competing start can clear the winner's shared reference. The listener can then remain available despite disabled state; loopback authentication and capability authorization still apply.
Confidence: 0.93
What I checked:
src/OpenClaw.Shared/WebSocketClientBase.cs:551, e70292487958)src/OpenClaw.Tray.WinUI/Services/NodeService.cs:773, e70292487958)src/OpenClaw.Tray.WinUI/App.xaml.cs:1096, e70292487958)src/OpenClaw.Connection/GatewayConnectionManager.cs:3356, e70292487958)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 November 8, 2026, 1:29 AM ET / 06:29 UTC.
shanselman commentedon Nov 8, 2026
Copilot agent handoff (not Scott). The audit found five concrete lifecycle defects, with no confirmed High-severity finding. All five repairs are published as separate, non-draft PRs. They preserve the existing owners rather than introducing a framework-wide state-machine rewrite. Local required validation passed for each; this is a delivery handoff, not a green-CI or merge approval.
b74a343ee694df5f01ba2e16709f38555833c4342b2da5dc61a5028a863bca748c63364606d818f969a1f27b0f8452c3416c99e0026bc2432e115a95a640c35de15432a6f56ec8449fd94b764ba680b5079b18dce43b8fd07d4fffc52913d194a3b84c7cLocal validation
Each published lane ran these exact mandatory commands in its own worktree:
Hosted CI and proof limits
ReasoningPicker_ReflectsInheritedDefaultWithoutOverridingExplicitChoices, not the MCP run's case) plus a compatibility archive HTTP 504 before those tests started. The crashing pure UI harness constructs no connection manager and does not exercise reconnect/removal; the native fault remains unresolved. Core/CLI, Tray/setup/integration, fixture UI (81/81), and WSL setup/connect (53 passed, 7 MXC NotExecuted), revocation (1/1) and network recovery (2/2) passed. Saved-gateway removal was not clicked without deletion confirmation; its routing is covered by the focused guard.cron.runwithFIXTURE_READ_ONLYand has nocron.runshandler. Its UI test proves rejection recovery only. Legacy accepted acknowledgements without RunId cannot safely correlate history, so they wait for an independent job-list update or the conservative 90-second safety timer rather than guessing from execution/completion timestamps. The earlier unrelatedActivationRouterTests.MigrationShutdown_UsesCurrentUserIpcWithoutCreatingADeepLinkRoute10-second timeout was preserved; its exact rerun passed, followed by the green full closeout above.Isolated app/Gateway fixtures are synthetic, not real provider or signed-package proof. No skipped/custom pool was described as completed, and no CI was blindly rerun. Individual PR bodies preserve the template, exact commands, source identities, review dispositions and proof boundaries. All five live PR identities, fork ownership,
maintargets, maintainer-edit settings, closing references and template content were verified. Owned app/fixture helpers have been stopped.The ready-PR delivery boundary is separate from merging: nothing was merged or put on auto-merge. Keep this umbrella open for human review and landing, including resolution of the visible CI blockers. No shared Gateway/runtime was changed.