fix(cron): treat cron tool warnings as non-fatal when run recovered#94855
fix(cron): treat cron tool warnings as non-fatal when run recovered#94855LiLan0125 wants to merge 3 commits into
Conversation
When an isolated cron agentTurn encounters a recoverable early tool error, the warning payload was classified as fatal even when the agent successfully recovered and produced final output. This caused delivery to be skipped and the run recorded as an error. Extend hasNonTerminalToolErrorWarning to also match the cron tool warning text pattern (isCronToolWarning), not only the metadata flag (nonTerminalToolErrorWarning). Closes openclaw#94846
|
Codex review: needs real behavior proof before merge. Reviewed June 21, 2026, 9:40 AM ET / 13:40 UTC. Summary PR surface: Source +11. Total +11 across 1 file. Reproducibility: yes. at source level: current main still gates recovered cron tool-warning recovery on channel final-text preference and returns before dispatch when the warning remains fatal. I did not run a live scheduled Feishu cron delivery in this read-only review. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one canonical cron payload-outcome fix that proves preference-false recovered-warning delivery, preserves genuine fatal structured-error suppression, and supersedes the overlapping candidate PRs after merge. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main still gates recovered cron tool-warning recovery on channel final-text preference and returns before dispatch when the warning remains fatal. I did not run a live scheduled Feishu cron delivery in this read-only review. Is this the best way to solve the issue? Not yet. The helper layer is a plausible fix location, but this branch still needs resolver regressions, real delivery proof, and maintainer selection among overlapping candidate PRs. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 11a2e03bd4de. Label changesLabel justifications:
Evidence reviewedPR surface: Source +11. Total +11 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
…payload When a recovered isolated cron run has a non-fatal tool warning and a final assistant-visible text, prefer the final text for delivery even when the channel preference flag is not set. This prevents the warning payload from being dispatched instead of the recovered output. Refs openclaw#94846
|
@clawsweeper re-review Added fix for the P1 payload-selection issue: when a recovered tool warning is non-fatal and final assistant text exists, prefer the final text for delivery even without the channel preference flag. This prevents the warning payload from being dispatched instead of the recovered output. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
…ring fatality Per ClawSweeper review: when checking isCronToolWarning on the last error text, also verify that ALL error payloads match the tool warning pattern. This prevents mixed-error scenarios where a genuinely fatal error payload precedes a tool warning from being incorrectly classified as non-fatal. Refs openclaw#94846
|
@clawsweeper re-review Tightened the recovered-warning predicate per P1 feedback: now requires — all error payloads must be cron tool warnings before clearing fatality, not just the last one. This prevents mixed-error scenarios from being incorrectly classified as non-fatal. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
Verification
Impact Assessment
Real behavior proof
Behavior addressed: Recovered cron tool warnings that produced final output had their warning text dispatched instead of the final assistant report. After both fixes, non-fatal classification + final-text preference ensures recovered output is delivered.
Environment tested: Node 22.x on Linux, vitest test suite.
Steps run after the patch: Ran the cron helpers test suite.
Evidence after fix:
Observed result: All 25 tests pass. The hasNonTerminalToolErrorWarning gate now covers both metadata and text patterns, and recovered final text is preferred over warning payloads.
Not tested: Live scheduled cron job with Feishu delivery was not exercised.
Closes #94846