Repository navigation
fix(agents): correct cron background completion guidance - #199003
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. What this changesThis PR tells isolated cron agents to collect background command results before ending their turn. Example: An isolated cron run starts a background command that eventually prints CRON_EXEC_DONE.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep this PR open: it corrects a current-main cron guidance regression with a focused change; no introduced code or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe exec notification owner records completion eligibility on each process; the shared formatter consumes those facts to produce guidance for exec launches and subsequent process observations. flowchart TD
A[Cron or conversation agent] --> B[Exec process owner]
B --> C[Notification destination and acceptance guard]
C --> D[Shared guidance formatter]
D --> E[Exec and process results]
B --> F[Completion admission]
F --> G[Originating session follow-up]
Technical reviewBest possible solution: Retain the shared formatter correction using the notification owner's existing acceptance guard. Do we have a high-confidence way to reproduce the issue? Source establishes the failure path: cron captures a notification destination and acceptance guard, but current main promises an after-turn wake based only on the destination; the PR reports matching base-red/head-green regression results, which were not independently executed in this read-only review. Is this the best way to solve the issue? This is the smallest complete guidance repair: consume the existing lifecycle fact in the shared formatter, preserve ordinary wake behavior, and extend the existing regression fixture without adding state or another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1ac07b333581. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +6, Tests +4, Docs +1. Total +11 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 14, 2026, 11:28 AM ET / 16:28 UTC. |
|
Merged via squash auto-merge.
|
Related: #198908
What Problem This Solves
Fixes: delivery-enabled isolated cron agents can be told to end their turn while waiting for a background command, even though the command's completion needs the originating run to remain active.
User Impact
Cron agents receive guidance to collect the command's result before ending their turn. Ordinary conversations retain their automatic completion-wake guidance.
Why This Change Was Made
The shared exec/process formatter now uses the acceptance guard already recorded by the notification owner when deciding whether to promise a wake after turn completion. The existing cron admission guard still rejects completions after their originating run ends. No runtime state or configuration is added.
Evidence
2a8e0b3c6ed6afeef33331871c5822024f19f986: the extended real-exec regression fails in all four cron cases because the returned guidance says to end the turn; the ordinary case passes. Vitest 75.41s, wrapper 141.63s including cold worker preparation.fb4963ad679a3fb40905e670c47a4e2011a4a68e: the complete exec-followup file passes 18/18, including live/queued completion and ended-run refusal. Vitest 33.25s, wrapper 99.25s. The change adds four net test lines to the existing fixture.The regression executes the actual exec/native-process and session-event owners with fixed command output. It does not measure model compliance or run a scheduled model invocation. No live service, credential, permission, or storage behavior changes.