mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 04:28:34 +00:00
Cron: preserve session scope for main-target reminders
This commit is contained in:
@@ -640,9 +640,10 @@ export async function executeJobCore(
|
||||
: 'main job requires payload.kind="systemEvent"',
|
||||
};
|
||||
}
|
||||
// main-target cron jobs should always resolve via the agent's main session.
|
||||
// Avoid forwarding persisted channel session keys from legacy records.
|
||||
const targetMainSessionKey = undefined;
|
||||
// Preserve the job session namespace for main-target reminders so heartbeat
|
||||
// routing can deliver follow-through in the originating channel/thread.
|
||||
// Downstream gateway wiring canonicalizes/guards this key per agent.
|
||||
const targetMainSessionKey = job.sessionKey;
|
||||
state.deps.enqueueSystemEvent(text, {
|
||||
agentId: job.agentId,
|
||||
sessionKey: targetMainSessionKey,
|
||||
|
||||
Reference in New Issue
Block a user