Skip to content

[Bug]: cron systemEvent payload.text lost in main-session handoff — agent receives bare heartbeat poll without payload (regression from 4.25 transient runtime context) #73189

@WhiteGiverMa

Description

@WhiteGiverMa

Summary

Cron jobs with sessionTarget: "main" + payload.kind: "systemEvent" fire on schedule but the payload.text is not injected into the session context. The agent only receives a bare [OpenClaw heartbeat poll] with no actual system event payload, resulting in "ghost runs" — the cron run records status: ok but the intended prompt never reaches the agent.

Environment

  • OpenClaw 2026.4.26 (be8c246) (also reproduces on 4.25)
  • Linux (WSL2 Ubuntu, Node v24.14.0)
  • Cron job: sessionTarget: "main", payload.kind: "systemEvent", wakeMode: "now"

Steps to Reproduce

  1. Create a cron job targeting the main session with a system event payload:
{
  "sessionTarget": "main",
  "wakeMode": "now",
  "payload": {
    "kind": "systemEvent",
    "text": "💕 Some system event text here"
  }
}
  1. Wait for the cron to fire, or trigger it manually with cron run

  2. Check the session trajectory (trajectory.jsonl) at the corresponding timestamp

  3. Observe prompt.submitted.data.prompt:

'[OpenClaw heartbeat poll]'   ← payload.text missing!
  1. The messages array contains only prior chat history — no system message with payload.text

Actual Behavior

The session trajectory at prompt.submitted shows:

prompt: '[OpenClaw heartbeat poll]'
messages: [18 prior chat messages, no system event]

The cron's payload.text is entirely absent from the compiled session prompt. The cron run log says status: "ok" but the agent never sees the intended system event.

Expected Behavior

The cron's payload.text should be injected into the session context as a system-level message (or equivalent), so the agent can act on the cron's instructions.

Evidence

From the trajectory JSONL (prompt.submitted entry for a cron-triggered session run):

  • data.prompt = "[OpenClaw heartbeat poll]" (bare tag, no payload)
  • data.systemPrompt = (SOUL.md, AGENTS.md, etc. — no cron text)
  • data.messages = 18 conversation history messages only
  • channel = cron-event (correctly identified)

Meanwhile cron runs correctly shows the full payload.text in the run summary — so the cron service has the text, but it doesn't survive the handoff to the session.

Likely Root Cause

The 4.25 changelog entry:

"Agents/runtime: submit heartbeat, cron, and exec wakeups as transient runtime context instead of visible user prompts, keeping synthetic system work out of chat transcripts. Fixes #66496 and #66814."

This change moved cron/heartbeat wakeups from visible user prompts to "transient runtime context", which appears to have broken the injection pipeline for payload.text. The text is held by the cron scheduler (visible in run summaries) but never reaches the session prompt compilation.

Related Issues/PRs

Impact

  • Cron-based system events for the main session are effectively broken since 4.25
  • Workflows depending on cron system events (reminders, scheduled prompts, heartbeat-driven actions) silently fail
  • No error or warning is surfaced — runs look successful in the cron dashboard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions