Repository navigation
fix(agent): retry transient settled finalization - #126404
MagMueller wants to merge 5 commits into
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 real behavior proof before merge. What this changesThis PR retries a transient, capability-free finalizer failure once and adds a five-minute deadline to each finalization attempt. Example: A browser task completes, but its isolated final-answer request receives HTTP 503.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 6 items remain Keep open: this PR contains distinct, maintainer-engaged recovery work that current main does not replace; the three previously reported correctness blockers remain. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherAfter tool execution settles, the embedded runner sends frozen context through the selected harness's restricted finalizer and converts its result into terminal reply payloads. flowchart TD
A[Settled tool execution] --> B[Terminal preparation]
B --> C[Finalization eligibility]
C --> D[Restricted harness finalizer]
D --> E[Transient failure classification]
E --> D
D --> F[Terminal reply delivery]
Technical reviewBest possible solution: Extend current main's existing finalization loop with bounded typed retries, configured deadlines, cancellation-aware rate-limit waits, and preserved structured transport evidence. Do we have a high-confidence way to reproduce the issue? Source establishes the failure paths and the three patch defects; no target code or tests were executed under this read-only review. Is this the best way to solve the issue? The restricted-finalizer boundary is the right repair location, but this implementation is incomplete; replaying the original tool-bearing request would be unsafe, while current main's existing loop and attempt controls provide a smaller integration point. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 137e7b2abc87. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +70, Tests +191. Total +261 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 HistoryReview history (5 earlier review cycles)
Reviewed October 18, 2026, 1:00 AM ET / 05:00 UTC (Revision 6). |
|
@clawsweeper re-review The PR body now includes the required real 106-task behavior proof, including the negative result: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
6f11544 to
c6ca82a
Compare
|
ClawSweeper recorded closeout evidence for this proposed close.
|
|
Scope clarification after #138362: that merge repairs eligibility for the initial tool-free finalization request; it does not implement this PR's typed transient-finalizer retry. At ca3c749a510, the finalization loop retries an The typed transient retry and deadline policy proposed here therefore require a separate assessment. Neither the new eligibility fix nor the existence of #133520's fallback alone establishes identical behavior. I am not closing this PR as a duplicate of #138362; this note is a scope distinction, not approval of the proposed retry policy. |
|
Related update: #138985 has merged. It addresses recovery eligibility after transport failures, not the typed transient-finalizer retry and deadline policy proposed here. This PR is not being closed as superseded by that merge. |
|
Related merge: #140367 landed in main on September 6, 2026 (04081aa). It makes a truncated ordinary completions call eligible for the existing tool-free finalization path after settled tools, even when pre-tool commentary was delivered. This differs from retrying a transient failure inside the isolated finalization request itself. #140367 does not implement this PR's transient-finalizer retry policy or deadline changes. Leaving this PR open. |
|
#147203, merged as This PR targets a different stage: transient failure inside the isolated, tools-disabled finalization attempt itself. The merged change does not replace that finalization-retry behavior. Keeping this PR open. |
|
Related: #154930 merged into main and silences the host-generated missing-summary fallback for cron-triggered runs. Release availability and deployment are unverified. This does not implement the typed transient-finalizer retry or 300-second deadline proposed here. Silencing a cron placeholder after unsuccessful recovery is different from recovering a useful answer by retrying the isolated finalizer. Keeping this PR open; its retry and deadline policy is not replaced by the merged fix. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Related: #126255
What Problem This Solves
After a tool turn is fully settled, OpenClaw can need one isolated, tool-free request to produce a visible final answer. A transient stream-idle or retryable provider interruption in that request can otherwise discard a completed browser task.
Design
requestTimeoutMs; explicit provider policy and the local-provider post-event idle exemption remain unchanged.Evidence
main.9a3fffeab9008cc7a9b7c2a49f0e4dacba35aa37, rebased onto3ae680f7143336e6918f8819163a3cbf21882e92.pnpm check:changedpassed after rebase.Evaluation result
Combined with #126255 and #127796, full run 32556602972 scored 86/106 (81.13%), above historical Laith OpenClaw at 82/106. Browser lifecycle was clean on all 106 tasks, with zero Harness IPC/capture timeout signatures. A final exact-current-head smoke/full rerun is being recorded separately before merge.