Repository navigation
Description
Template: Bug report
Bug type: Behavior bug (incorrect output/state without crash)
Beta release blocker: No
Summary
An automation with delivery.mode: "webhook" sends a "finished" POST for a run that skipped before it started. The webhook receives status: "skipped" with the skip text in summary ("Automation admission deferred by its current window or foreground activity", "Automation scratch is explicitly empty"), as if that text were the run's output.
Steps to reproduce
- Create an isolated agent-turn automation with a trigger script and webhook delivery, for example
trigger: { script: "json({ fire: true })" },delivery: { mode: "webhook", to: "https://example.invalid/hook" },idleOnly: true. - Let the trigger fire while the agent is busy, so the isolated run defers its admission.
- Watch the webhook endpoint.
A second way to see it, without a trigger:
- Create an isolated agent-turn automation with
payload.skipIfScratchEmpty: trueand webhook delivery (cron.add). For a local receiver, allow it withcron.webhookSsrfPolicy.allowedHostnames. - Write an empty scratch (
cron.scratch.setwithcontent: "") and run it (cron.runwithmode: "force"). - Watch the webhook endpoint.
Expected behavior
No POST. Nothing ran, so there is no output to deliver. A deferred run without a trigger already sends nothing (the runner skips webhook delivery for deferred admissions), and announce delivery does not run for these skips.
Actual behavior
One POST with action: "finished", status: "skipped" and the skip text as summary, and the run is recorded as deliveryStatus: "delivered".
The runner's check that skips the webhook for deferred admissions only matches runs with no trigger result. Once a trigger has fired, the run carries a trigger result, so the check no longer matches and the skip text goes out. Skips that are not admission deferrals at all, such as an empty scratch, are not covered by that check in the first place.
OpenClaw version
main at d275ff6 (2026-11-16)
Operating system
macOS (isolated local Gateway; nothing OS-specific in the cause)
Install method
Source checkout
Model
Not model-specific (the run never starts)
Provider / routing chain
Not applicable
Logs
Empty-scratch case on an isolated local Gateway built from main, webhook pointed at a throwaway receiver. The receiver got exactly one request:
POST /hook {"action":"finished","status":"skipped","summary":"Automation scratch is explicitly empty","deliveryStatus":"delivered"}
cron.runs records the same run as status: "skipped", deliveryStatus: "delivered". No model call was made.
The trigger case was reproduced with the cron service test harness (a trigger that fires, an isolated run that defers): sendCronWebhook is called once with status: "skipped" and summary: "Automation admission deferred by its current window or foreground activity".
Impact and severity
Webhook receivers that treat a "finished" event with a summary as a result (forwarding it to chat, a ticket, a log of findings) record status text as if the automation had produced it. Trigger-based watchers on busy agents hit this on every deferred occurrence.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Nov 16, 2026
Codex review: this still needs some work.
Summary
Current main still delivers pre-execution skip text to webhooks, and a same-author open PR explicitly closes this issue.
Reproducibility: Current source establishes both skip paths reaching primary webhook delivery; the reporter supplies Gateway and harness observations, but this review ran no reproduction.
Next step
Review #200032 for both skip cases and preserved output/error delivery, keeping this issue open until the linked repair is resolved.
Review details
Best possible solution:
Suppress primary webhook delivery for explicit pre-execution skips while preserving run history, scheduling semantics, real output, and error delivery.
Do we have a high-confidence way to reproduce the issue?
Current source establishes both skip paths reaching primary webhook delivery; the reporter supplies Gateway and harness observations, but this review ran no reproduction.
Is this the best way to solve the issue?
The linked PR targets the delivery boundary with skipped plus executionStarted=false, avoiding changes to the scheduling predicate whose trigger-consumption behavior is intentional.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 7f234bd91294.
Label changes
Label changes:
No label changes.
Label justifications:
P2: A bounded automation delivery bug produces misleading webhook results without establishing an outage or urgent regression.impact:other: Webhook consumers can create false findings, tickets, or notifications from scheduler skip text.Evidence reviewed
What I checked:
src/cron/service/timer-job-runner.ts:79, 7f234bd91294)src/cron/service/admission-deferred.ts:13, 7f234bd91294)src/cron/service/timer-execution.ts:219, 7f234bd91294)docs/automation/cron-jobs/delivery.md:22, 7f234bd91294)src/cron/service/admission-deferred.ts:5, ec5d369a6f66)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed November 16, 2026, 3:37 AM ET / 08:37 UTC.
fix(cron): webhook automations POST skip text when a run skips before…
fix(cron): webhook automations POST skip text when a run skips before…
fix(cron): webhook automations POST skip text when a run skips before…
fix(cron): webhook automations POST skip text when a run skips before…