Cherry-pick 8ae1987f2: fix(cron): pass heartbeat target=last for main-session cron jobs#1393
Merged
alexey-pelykh merged 2 commits intomainfrom Mar 15, 2026
Merged
Conversation
…nclaw#28508) (openclaw#28583) * fix(cron): pass heartbeat target=last for main-session cron jobs When a cron job with sessionTarget=main and wakeMode=now fires, it triggers a heartbeat via runHeartbeatOnce. Since e2362d3 changed the default heartbeat target from "last" to "none", these cron-triggered heartbeats silently discard their responses instead of delivering them to the last active channel (e.g. Telegram). Fix: pass heartbeat: { target: "last" } from the cron timer to runHeartbeatOnce for main-session jobs, and wire the override through the gateway cron service builder. This restores delivery for sessionTarget=main cron jobs without reverting the intentional default change for regular heartbeats. Regression introduced in: e2362d3 (2026-02-25) Fixes openclaw#28508 * Cron: align server-cron wake routing expectations for main-target jobs --------- Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 8ae1987)
- Fix agentEntry type narrowing (false | AgentConfig → AgentConfig | undefined) - Revert test assertions to match fork's resolveCronSessionKey behavior
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 of upstream commit
8ae1987f2.Author: Marcus Widing
Category: Cron fix
Passes
heartbeat: { target: "last" }for main-session cron jobs so cron-triggered heartbeats deliver to the last active channel instead of being silently swallowed.Conflict resolution: Fork already replaced
targetMainSessionKeywithjob.sessionKey— kept fork's sessionKey and added upstream'sheartbeat: { target: "last" }.Part of #674.