Skip to content

Automation webhook POSTs skip text as output when a run skips before it starts #200030

Closed

Description

@daniel-lxs

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

  1. 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.
  2. Let the trigger fire while the agent is busy, so the isolated run defers its admission.
  3. Watch the webhook endpoint.

A second way to see it, without a trigger:

  1. Create an isolated agent-turn automation with payload.skipIfScratchEmpty: true and webhook delivery (cron.add). For a local receiver, allow it with cron.webhookSsrfPolicy.allowedHostnames.
  2. Write an empty scratch (cron.scratch.set with content: "") and run it (cron.run with mode: "force").
  3. 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.

Activity

  1. added
    clawsweeper:intake:bug
    P2
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    and removed
    clawsweeper:intake:bug
    on Nov 16, 2026
  2. clawsweeper commented on Nov 16, 2026

    @clawsweeper
    Contributor

    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:

    • The linked repair remains unmerged; its reported runtime and regression results were not independently executed during this read-only review.

    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:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 16, 2026, 3:37 AM ET / 08:37 UTC.

  3. added a commit that references this issue on Nov 17, 2026
    7b0a97a
  4. added a commit that references this issue on Nov 18, 2026
    eca9393
  5. added a commit that references this issue on Nov 19, 2026
    1de83ff
  6. added a commit that references this issue on Nov 23, 2026
    19a6c07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:otherissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions