openclaw - 💡(How to fix) Fix Bug: Gateway silently strips cron jobs with non-systemEvent/agentTurn payload.kind

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The gateway cron store validation in src/cron/persisted-shape.ts treats any payload.kind that is not exactly "systemEvent" or "agentTurn" as "invalid-payload" and silently drops the job during the periodic write cycle (~every minute). No warning, no error, no notification.

Error Message

The gateway cron store validation in src/cron/persisted-shape.ts treats any payload.kind that is not exactly "systemEvent" or "agentTurn" as "invalid-payload" and silently drops the job during the periodic write cycle (~every minute). No warning, no error, no notification.

Root Cause

src/cron/persisted-shape.ts:

if (payloadKind !== "systemEvent" && payloadKind !== "agentTurn") {
  return "invalid-payload";
}

Fix Action

Workaround

Convert all jobs to payload.kind: "systemEvent" — but shell-command jobs then hit the second bug (see related).

Code Example

if (payloadKind !== "systemEvent" && payloadKind !== "agentTurn") {
  return "invalid-payload";
}
RAW_BUFFERClick to expand / collapse

Description

The gateway cron store validation in src/cron/persisted-shape.ts treats any payload.kind that is not exactly "systemEvent" or "agentTurn" as "invalid-payload" and silently drops the job during the periodic write cycle (~every minute). No warning, no error, no notification.

Impact

3 production cron jobs were lost for 12 days before discovery:

  • tango-events-daily — daily tango/milonga event report
  • daily-spend-summary — daily AI spend summary
  • meta-pixel-enrichment-reminder — one-shot Meta pixel deadline reminder

These jobs had payload.kind: "command" and payload.kind: "agentmessage" — both silently stripped.

Root cause

src/cron/persisted-shape.ts:

if (payloadKind !== "systemEvent" && payloadKind !== "agentTurn") {
  return "invalid-payload";
}

Expected behavior

  • Unknown payload.kind values should be preserved (pass-through) rather than silently dropped
  • At minimum, log a warning when a job is rejected due to invalid payload kind
  • The doctor-cron-store-migration already normalizes legacy kinds — this validation should happen at normalization time, not at write time

Workaround

Convert all jobs to payload.kind: "systemEvent" — but shell-command jobs then hit the second bug (see related).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • Unknown payload.kind values should be preserved (pass-through) rather than silently dropped
  • At minimum, log a warning when a job is rejected due to invalid payload kind
  • The doctor-cron-store-migration already normalizes legacy kinds — this validation should happen at normalization time, not at write time

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING