Repository navigation
fix: preserve execution budgets and late task replies - #148508
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 14, 2026, 5:13 PM ET / 21:13 UTC (Revision 3). ClawSweeper reviewWhat this changesPreserves configured execution limits across agent continuations and recovery, keeps observing late replies, and aligns node-operation and transport timeouts. Merge readiness✅ Ready for maintainer review This PR remains useful: current main retains the timeout and late-reply defects, and the related merged work does not replace these repairs. No actionable introduced correctness or security defect was found. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw's agent runtime receives commands, background-task events, and delegated results through the Gateway. Execution owners set run deadlines, while observers wait for completion and route results back to conversations. flowchart TD
A[Commands and task events] --> B[Gateway admission]
C[Configured or saved budgets] --> D[Agent execution]
B --> D
D --> E[Completion observer]
E --> F{Terminal result or cancellation}
F -->|Still pending| E
F -->|Completed| G[Conversation reply]
F -->|Cancelled| H[Stop observation]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +50, Tests +244, Docs +14. Total +308 across 38 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep execution deadlines with the existing run owners and let completion observers retain late results without changing explicit limits or cancellation. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main imposes shorter wrapper deadlines and stops reply observation after one wait. Focused regressions exercise those paths, but this review did not execute them. Is this the best way to solve the issue? Yes. The patch reuses existing execution and observation owners, preserves explicit overrides, and avoids new configuration or persistent state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c5695c7579dc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
48adcf6 to
5c9c0e2
Compare
5c9c0e2 to
7d05023
Compare
|
Merged via squash.
|
Related: #148388, #148450
What Problem This Solves
Long-running work can be cut short, lose its configured budget after resuming, or lose its late reply when a shorter startup, monitoring, or wait timeout expires.
User Impact
ACP turns and approved command continuations keep their execution budgets. Recovered and resumed children retain their saved timeout, including explicit zero. Background-task reviews use the ordinary agent budget. Late session replies remain observable, and long node operations receive enough time at both invocation and transport layers. Explicit shorter overrides and cancellation remain effective; no configuration changes are required.
Why This Change Was Made
Execution deadlines belong to the run owner. The patch removes ACPX's duplicate turn timers and the fixed approval-continuation limit, carries saved child budgets through recovery and both descendant-resume paths, and derives heartbeat policy from the events actually included in the turn.
Node operations reuse one timeout calculation with transport grace. A2A observers reuse the run-wait owner through nonterminal snapshots while foreground waits stay bounded. Terminal timeout classification is shared; observers stop on terminal results, transport failure, or Gateway lifecycle cancellation. Observation remains in memory and does not provide delivery across a Gateway restart.
Evidence
7d0502350cf6002caecc7eb2f660990f6f4dab32, with 144 successful GitHub checks. Native prepare and merge verified that same head; landed commit. No live Gateway was modified or restarted.