Skip to content

Cherry-pick 2330c71b6: fix(cron): suppress delivery when multi-payload response contains HEARTBEAT_OK#1619

Merged
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/2330c71b6-cron-heartbeat-suppress
Mar 18, 2026
Merged

Cherry-pick 2330c71b6: fix(cron): suppress delivery when multi-payload response contains HEARTBEAT_OK#1619
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/2330c71b6-cron-heartbeat-suppress

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick from upstream

Upstream commit: 2330c71b6
Author: Adhish [email protected]

fix(cron): suppress delivery when multi-payload response contains HEARTBEAT_OK

Depends on #1618

…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)
@alexey-pelykh alexey-pelykh merged commit 81290d6 into main Mar 18, 2026
6 of 7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/2330c71b6-cron-heartbeat-suppress branch March 18, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant