openclaw - 💡(How to fix) Fix [cron] announce-on-failure replay should dedup by intent [1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#76985Fetched 2026-05-04 04:59:45
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
2
Timeline (top)
mentioned ×4subscribed ×4commented ×1

When a cron.add (or cron.update) fails validation, the rejection is logged into the gateway's announce-on-failure stream and replayed at the originally-scheduled fire time. If the operator/agent retries with a corrected payload under a new cron job ID, the stale failure is still announced at fire time, surfacing a misleading rejection while the actual reminder is running on a different working ID.

Root Cause

The failure-replay surfaces stale errors to operator chats long after the operator has corrected the issue, eroding trust in the cron system. Combined with the documentation gap (the canonical Block 0 cron tool description doesn't mention the sessionTarget constraint, so non-default agents reasonably default to "main" and trip this exact path), it creates a fail-then-discover loop that's measurably bad for operator UX.

Fix Action

Fix / Workaround

Workarounds we shipped locally (in case OpenClaw wants to reference them)

RAW_BUFFERClick to expand / collapse

Summary

When a cron.add (or cron.update) fails validation, the rejection is logged into the gateway's announce-on-failure stream and replayed at the originally-scheduled fire time. If the operator/agent retries with a corrected payload under a new cron job ID, the stale failure is still announced at fire time, surfacing a misleading rejection while the actual reminder is running on a different working ID.

Repro

  1. cron.add with sessionTarget="main" on a non-default agent. Gateway rejects with sessionTarget "main" is only valid for the default agent.
  2. cron.add again with the corrected sessionTarget="isolated" + payload.kind="agentTurn". Job stored, scheduled.
  3. At the scheduled fire time, the stale rejection from step 1 is announced to the configured channel.

Proposed fix

Dedup announce-on-failure deliveries by intent. The intent key could be (agentId + scheduleName + scheduleTime) or a hash of those fields. When a successful schedule lands with the same intent key as a previous failure, mark the failure entry as superseded so the announce skips it.

Why this matters

The failure-replay surfaces stale errors to operator chats long after the operator has corrected the issue, eroding trust in the cron system. Combined with the documentation gap (the canonical Block 0 cron tool description doesn't mention the sessionTarget constraint, so non-default agents reasonably default to "main" and trip this exact path), it creates a fail-then-discover loop that's measurably bad for operator UX.

Workarounds we shipped locally (in case OpenClaw wants to reference them)

We documented the sessionTarget constraint inline in the canonical Block 0 cron tool description as a line-scoped prompt-policy transform (so non-default agents see it before failing first), and added a platform-side validator that rejects session_target="main" at the HTTP boundary so the gateway never logs the failure in the first place. These close the agent-side and platform-side legs respectively, but the gateway-side replay-dedup is the right canonical fix for the failure-stream replay class.

extent analysis

TL;DR

Implementing deduplication of announce-on-failure deliveries by intent can prevent stale rejections from being announced after a corrected cron job has been scheduled.

Guidance

  • Identify the intent key for each cron job, which could be a combination of agentId, scheduleName, and scheduleTime, to uniquely identify each job.
  • When a successful schedule lands with the same intent key as a previous failure, mark the failure entry as superseded to skip announcing it.
  • Consider adding a platform-side validator to reject invalid sessionTarget values at the HTTP boundary to prevent failures from being logged in the first place.
  • Documenting the sessionTarget constraint inline in the canonical Block 0 cron tool description can help prevent initial failures.

Example

No code snippet is provided as it is not clearly supported by the issue, but an example intent key could be a hash of (agentId + scheduleName + scheduleTime).

Notes

The proposed fix focuses on deduplication of announce-on-failure deliveries, but additional measures like platform-side validation and documentation updates can also help mitigate the issue.

Recommendation

Apply the workaround of implementing deduplication of announce-on-failure deliveries by intent, as it directly addresses the problem of stale rejections being announced after a corrected cron job has been scheduled.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [cron] announce-on-failure replay should dedup by intent [1 comments, 2 participants]