Repository navigation
fix: deliver watcher results while other sessions are busy - #152287
Conversation
Resume targeted background command completions without waiting for unrelated sessions or automation work. Preserve the destination session ordering and recovery guards, scheduled heartbeat policy, and credential expiry. Prove failed watcher notification with a real model while a sibling session remains active.
|
🦞👀 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 18, 2026, 8:11 PM ET / September 19, 2026, 00:11 UTC. ClawSweeper reviewWhat this changesAllows background command results to resume their idle originating session while unrelated sessions or automations are busy, with regression coverage and documentation. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and the latest release still defer targeted completions behind unrelated work. No actionable introduced defect was found; destination-session ordering and scheduled-work guards remain intact. Priority: P2 Review scores
Verification
How this fits togetherBackground commands enqueue completion events for their originating conversation. The Gateway’s heartbeat runner admits these follow-up turns and sends their results through the existing reply and delivery pipeline. flowchart TD
A[Background command exits] --> B[Originating session event queue]
B --> C{Completion without scheduled work?}
C -->|Yes| D[Check destination session and recovery]
C -->|No| E[Also check shared busy guards]
E --> D
D -->|Busy| F[Retain event and retry]
D -->|Idle| G[Run follow-up and deliver result]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +9, Tests +176, Docs +2. Total +187 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep completion admission with the existing heartbeat runner, bypass unrelated load checks, and preserve destination-session ordering and scheduled-work policy. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: enqueue a targeted command completion while unrelated main, automation, or same-agent work is active; current main defers it. The PR reports a matching live reproduction, but this review did not execute tests. Is this the best way to solve the issue? Yes. The exception repairs the existing admission owner without adding another delivery path, and retains exact-session and coalesced-schedule protections. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c9584688c461. 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.
|
* commit 'ca69b4d25dfcd488acc6ba1d878e4b4252f40cd2': (325 commits) perf(gateway): streamline config reload comparison (#152279) fix(xai): reject invalid UTF-8 OAuth responses (#111737) fix(release): accept waived advisory performance evidence for stable publication (#152290) fix: deliver watcher results while other sessions are busy (#152287) perf(media): reuse attachment filename classification (#152274) refactor(build): reuse forwarded option scanning (#152293) chore(diagnostics-otel): revert unapproved duration-bucket merge (#152292) fix: stop chat media reads after access changes (#152219) fix(test): use Gateway WebSocket transport in network fixtures (#152143) improve: retain quota refresh evidence from successful CI runs (#152173) improve(gateway): reduce memory used by session selection (#152260) perf(agents): use keyed subagent capability lookups (#152263) refactor(matrix): centralize media metadata assembly (#149128) chore(ui): refresh control ui locales (#152276) feat: open Crabbox apps beside the conversation (#152094) refactor: simplify worker and model fallback handling (#152268) perf(codex): reconcile session catalogs incrementally (#152257) fix(ui): keep submitted prompts visible across session startup (#152241) perf(sessions): move automatic maintenance database work to workers (#148630) fix: preserve reply metadata through outbound preparation (#152231) ...
* commit '912b21b98581c0be3baad87fe3686b64d69fffeb': (191 commits) perf(process): reduce allocation while processing command output (#152261) fix(ui): collapse duplicate previews when a page opens in multiple tabs (#152281) fix(test): run local Gateway tests behind protected exec egress (#152318) fix(node-host): avoid blocking configuration reads (#151411) fix(qa-lab): prevent Evidence Archive filters from overflowing (#152123) test: stabilize Docker scheduler signal fixtures on macOS (#152301) fix(ui): close stuck submenus when moving between menu rows (#152317) fix(ui): preserve question drafts and pending submissions (#152096) fix(release): recognize 7.34 fs-safe contract (#152326) chore: retire CLAUDE.md files fix(ui): release queued input after completed chat runs (#152299) improve(tooling): reduce commit formatting resource use (#152297) feat: show mentioned sessions in Involving me (#152083) perf(tasks): reuse prepared audit summaries (#152294) fix(daemon): preserve LaunchAgent rollback bytes and modes (#152195) fix: stop chat layout changes from loading extra history (#151726) perf(gateway): streamline config reload comparison (#152279) fix(xai): reject invalid UTF-8 OAuth responses (#111737) fix(release): accept waived advisory performance evidence for stable publication (#152290) fix: deliver watcher results while other sessions are busy (#152287) ...
…152287) Resume targeted background command completions without waiting for unrelated sessions or automation work. Preserve the destination session ordering and recovery guards, scheduled heartbeat policy, and credential expiry. Prove failed watcher notification with a real model while a sibling session remains active.
What Problem This Solves
Fixes background watcher results remaining unread when unrelated sessions or automations keep a shared agent busy. A failed CI watcher could exit after the agent's final reply without the agent receiving its error.
User Impact
Successful and failed background commands can resume their originating idle session. An active destination session, pending delivery, and recovery still retain their ordering protections. Existing credential expiry and permission checks remain in force.
Why This Change Was Made
Pure targeted exec completions no longer use the broad busy checks intended for ambient heartbeat work. Scheduled work coalesced with a completion keeps its existing guards.
Evidence
openclaw/ci-gate. ClawSweeper also found no actionable defects.