Repository navigation
Keep quiet heartbeats quiet after tool failures - #156174
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b318fac3a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 1:11 AM ET / 05:11 UTC. ClawSweeper reviewWhat this changesThe PR suppresses warnings and accumulated media when a completed heartbeat chooses no notification, and retires its exact unsent delivery records while preserving runner failures. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, focused fix: inspected main and release code still permit the unwanted warning. The earlier media-suppression finding is addressed, and no blocking code defect was found; after-fix real behavior proof remains required. Priority: P2 Review scores
Verification
How this fits togetherHeartbeats run background agent checks and pass their results through OpenClaw’s shared reply dispatcher. That dispatcher decides what reaches a channel and records delivery state for restart recovery. flowchart TD
A[Background heartbeat] --> B[Tool results and media]
B --> C[Notification decision]
C --> D{Quiet completed turn?}
D -->|Yes| E[Suppress prepared deliveries]
D -->|No| F[Existing channel delivery]
E --> G[Record heartbeat outcome]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +5, Tests +75. Total +80 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the notification decision at the final delivery boundary and use existing exact-record settlement to prevent quiet warnings from returning through recovery. Do we have a high-confidence way to reproduce the issue? Yes, from source: a mutating tool failure followed by notify:false can produce a warning or media that main’s failure classification still permits sending. This review did not execute that path. Is this the best way to solve the issue? Yes. Enforcing the existing structured decision after payload assembly covers both warnings and media without changing ordinary reply generation or adding another delivery owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f45f36e8eb9e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* fix: honor quiet heartbeat outcomes after tool failures * fix: make heartbeat notification decision cover failure delivery * fix: retire unsent warnings after quiet heartbeat outcomes * fix: preserve heartbeat runner failures after an earlier quiet decision
What Problem This Solves
A heartbeat can explicitly choose
notify=falseafter a failed tool call and still send a visible “Bash failed” warning. This makes background discovery interrupt the user even after the agent decides there is nothing worth reporting.Honor the structured notification decision at the final delivery decision, where it covers both synthesized warnings and accumulated tool media. Exact unsent delivery records are marked suppressed so restart recovery cannot later send the warning. Already queued or ambiguous sends retain their existing recovery ownership. An earlier quiet decision never suppresses a later agent-runner crash. The scheduler still records the failure;
notify=trueand failures without a structured outcome keep their existing behavior.Evidence
A live background run received an HTTP 403 during an exploratory read, then returned
heartbeat_respondwithnotify=false. Its final delivery still contained a synthesized tool warning. The regression follows failed message, exec, and bash calls through payload assembly and media merging into the notification decision. Runner-level cases check quiet and notified failures against the actual channel send boundary, including exact suppression, sibling preservation, and queued/ambiguous delivery ownership. The three new payload/media regressions fail on the release baseline; 69 focused cases pass with the complete fix on the release line.The selected release-line run took 33.83 seconds including worker preparation; the three new payload/media cases took 6 milliseconds combined.