Repository navigation
fix: stale completion notices open sessions on a different Gateway - #157103
Conversation
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 3:01 AM ET / 07:01 UTC. ClawSweeper reviewWhat this changesThe Control UI binds background-session completion notices to their submitting Gateway and account, checks that owner before opening a session, and updates tests and documentation. Merge readiness✅ Ready for maintainer review Keep open: current main and the latest release still have the stale-action bug, and this focused PR is a viable fix with browser evidence. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI sends a new background session to a Gateway and turns its completion into a notice. The notice’s Open session action changes the selected agent and session, then navigates the browser. flowchart LR
A[New Session submission] --> B[Gateway background run]
B --> C[Completion observer]
C --> D{Original Gateway and account?}
D -- Yes --> E[Completion notice]
E --> F{Owner current at click?}
F -- Yes --> G[Open original session]
D -- No --> H[Suppress stale notice]
F -- No --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +17, Tests +55, Docs +2. Total +74 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Preserve the selected Gateway’s conversation when an old notice is clicked, while allowing the originating account to open its completed task after a transport reconnect. Do we have a high-confidence way to reproduce the issue? Yes. Current main has the unguarded action, and the captured before-state supports a warm-reload, Gateway-switch, then Open session reproduction; this read-only review did not rerun it. Is this the best way to solve the issue? Yes. The branch reuses the palette’s Gateway/account ownership rule and checks it at both publication and click, keeping the repair within the existing Control UI owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7204d7df7b58. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes a completed background task's Open session action selecting its old session on a different Gateway. After an ordinary warm reload, the notification can survive a Gateway switch; clicking it previously changed the new Gateway's selected agent and session.
User Impact
An old completion notice no longer changes the newly selected Gateway's conversation. Reconnecting to the same authenticated account still allows opening the completed task.
Why This Change Was Made
Completion notices now share the palette's existing Gateway/account ownership check. The submitting owner is captured before asynchronous work and checked before publishing the completion and when its action is clicked. The background observer's wait/retry behavior is unchanged.
Evidence
Before: after clicking the old completion notice, the replacement Gateway incorrectly opens the previous Gateway's Reviewer session.
After: the same click preserves the replacement Gateway's Main session and Connection settings.