Cherry-pick 2330c71b6: fix(cron): suppress delivery when multi-payload response contains HEARTBEAT_OK#1619
Merged
alexey-pelykh merged 1 commit intomainfrom Mar 18, 2026
Conversation
…RTBEAT_OK When a cron agent emits multiple text payloads (narration + tool summaries) followed by a final HEARTBEAT_OK, the delivery suppression check `isHeartbeatOnlyResponse` fails because it uses `.every()` — requiring ALL payloads to be heartbeat tokens. In practice, agents narrate their work before signaling nothing needs attention. Fix: check if ANY payload contains HEARTBEAT_OK (`.some()`) while preserving the media delivery exception (if any payload has media, always deliver). This matches the semantic intent: HEARTBEAT_OK is the agent's explicit signal that nothing needs user attention. Real-world example: heartbeat agent returns 3 payloads: 1. "It's 12:49 AM — quiet hours. Let me run the checks quickly." 2. "Emails: Just 2 calendar invites. Not urgent." 3. "HEARTBEAT_OK" Previously: all 3 delivered to Telegram. Now: correctly suppressed. Related: openclaw#32013 (fixed a different HEARTBEAT_OK leak path via system events in timer.ts) (cherry picked from commit 2330c71)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick from upstream
Upstream commit:
2330c71b6Author: Adhish [email protected]
Depends on #1618