Avoid duplicate Agent Sessions remote refresh passes - #2079
Conversation
Opening the menu during an in-flight remote refresh was marking the gate pending, which forced a second Tailscale/SSH pass even when settings had not changed. Keep pending reserved for settingsDidChange so unchanged overlaps merge into the current pass. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Codex review: needs maintainer review before merge. Reviewed July 12, 2026, 12:03 AM ET / 04:03 UTC. Summary Reproducibility: yes. Current main deterministically marks an ordinary in-flight overlap as pending and therefore schedules a duplicate pass; the exact-head packaged-app harness demonstrates the corrected single-pass behavior across five menu opens. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the minimal gate correction and focused regression coverage after required exact-head checks complete, retaining the documented next-cycle retry behavior after a shared active failure. Do we have a high-confidence way to reproduce the issue? Yes. Current main deterministically marks an ordinary in-flight overlap as pending and therefore schedules a duplicate pass; the exact-head packaged-app harness demonstrates the corrected single-pass behavior across five menu opens. Is this the best way to solve the issue? Yes. Reserving pending state for settings changes is the narrowest maintainable fix because it preserves generation invalidation, stale-result suppression, and one settings-driven retry without introducing another concurrency mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 121e9ca1db82. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
|
@clawsweeper re-review Final maintainer validation is complete on exact head
Residual risk: callers overlapping an active failure share that failure until the next menu open or normal 60-second cycle; they no longer force a redundant immediate pass. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…alesce-overlap-refresh
|
@clawsweeper re-review Final maintainer validation is complete on exact head
Residual risk: callers overlapping an active failure share that failure until the next menu open or normal 60-second cycle; they no longer force a redundant immediate pass. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…alesce-overlap-refresh
|
@clawsweeper re-review Final maintainer validation is complete on exact head
Residual risk: callers overlapping an active failure share that failure until the next menu open or normal 60-second cycle; they no longer force a redundant immediate pass. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Validation
61cdbdc21983fa0902406df14a2f28c1defa636c, synchronized with currentmain.make check: generated docs, locale checks, SwiftFormat, and SwiftLint clean.61cdbdc2; strict code-sign and Gatekeeper accepted.1/0, then settled at1/1; the menu renderedqa-host — 1/qa-shared.Risk
Low. Concurrent callers now share an active remote failure instead of forcing an immediate duplicate pass; the next menu open or normal 60-second cycle retries. Settings changes still force one current-generation pass.
Dependencies
No dependency changes; freshness review not applicable.