perf: stop dormant agent session schedulers - #2850
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 3:29 PM ET / 19:29 UTC. ClawSweeper reviewWhat this changesThe PR stops Agent Sessions’ local and remote periodic refresh loops when their respective monitoring features are disabled, while adding lifecycle, overlap, and stale-result safeguards. Merge readinessKeep open: current main still starts both Agent Sessions schedulers unconditionally, while this PR adds scoped lifecycle control and regression coverage. Likely related people: steipete (high confidence) from the feature’s current-main and proposed lifecycle history. Priority: P2 Review scores
Verification
How this fits togetherAgent Sessions gathers local and remote session data for the menu bar. Settings determine which refresh paths run, and refreshed results feed the session state shown to the app. flowchart LR
A[User settings] --> B[Agent Sessions store]
B --> C{Monitoring enabled?}
C -->|Yes| D[Local and remote schedulers]
C -->|No| E[Cancel owned refresh work]
D --> F[Session refresh results]
E --> F
F --> G[Menu bar session state]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Land the scoped scheduler lifecycle change after the normal PR checks complete, preserving local adaptive monitoring while leaving remote discovery behind the Agent Sessions setting. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a proposed scheduler lifecycle and performance patch, not an issue report requiring a reporter reproduction. Is this the best way to solve the issue? Yes: separating local and remote scheduler eligibility preserves consented adaptive local monitoring while preventing dormant periodic work. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d7934a5f6121. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
Tests
make check(0 violations)make test(839 selections, 70/70 groups, no retries or timeouts)