Skip to content

failureAlert (after=1) never fires on 2026.6.5 — every errored run stuck at delivery_status 'not-requested' #92058

Closed

Description

@chrislro

Summary

On 2026.6.5 (5181e4f), per-job failure alerts configured with failureAlert.after = 1 never fire. Every errored cron run ends with delivery_status: "not-requested" in cron_run_logs, and every job's state shows lastFailureNotificationDeliveryStatus: "not-requested" — no notification is ever requested, let alone delivered.

Environment

  • OpenClaw 2026.6.5 (5181e4f), macOS (darwin), gateway under launchd
  • This install went through the 2026.6.5 legacy-JSON → SQLite cron-store migration (and separately hit the frozen-scheduler state after upgrade, cleared via doctor --fix + restart)

Evidence (one day, 2026-06-10)

7 errored runs across 3 jobs, all of which have failureAlert.after = 1 with a messaging channel target configured:

Job (type) Errors Error text
isolated sweep job (Sonnet pin, claude-cli runtime) 4 3× execution timed out, last phase: process-spawned, 1× stalled before execution start
weekly report job 2 stalled before execution start
daily report job 1 stalled before execution start

Zero alerts were delivered for any of them. In SQLite:

select status, delivery_status, count(*) from cron_run_logs
where status='error' and ts > (strftime('%s','now')-86400)*1000
group by 1,2;
-- error | not-requested | 6   (plus one earlier row with delivery_status = 'unknown')

All affected jobs' persisted state shows lastFailureNotificationDeliveryStatus: "not-requested".

Expected

An errored run on a job with failureAlert.after = 1 should request and deliver a failure notification to the configured channel after the first consecutive failure.

Notes / possibly related

Repro

  1. On 2026.6.5, configure any cron job with failureAlert.after = 1 and a channel target.
  2. Force the run to error (e.g. a payload that exceeds timeoutSeconds).
  3. Observe: no notification; cron_run_logs.delivery_status = 'not-requested'.

🤖 Generated with Claude Code

Activity

  1. clawsweeper commented on Jun 11, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 8, 2026, 8:41 AM ET / 12:41 UTC.

    Summary
    Keep open for proof-focused maintainer review. Current main does invoke the configured per-job alert on an errored run, but it records not-requested before the asynchronous send and never records that send’s outcome; the reported SQLite state therefore cannot establish that no alert was requested. Likely related person: Gio Della-Libera (low-confidence recent source routing).

    Reproducibility: yes. for the source-level observability defect: current main records the alert state before it fires the asynchronous sender. No current-main transport reproduction yet proves the reported external non-delivery.

    Maintainer decision needed

    Question Recommendation
    Should this remain an alert-outcome observability repair after a current-main gateway transport trace, or be re-scoped because current source already dispatches the alert? Obtain a current-main transport trace: Run an errored cron with a configured per-job alert through the actual gateway delivery seam and use its recorded result to scope the repair.

    Why: Current source disproves the report’s inference from not-requested, but it cannot prove the real transport outcome; a maintainer must decide once the production-boundary evidence distinguishes delivery failure from missing observability.

    Next step
    A current-main transport trace and maintainer choice of the durable outcome-recording boundary are required before a safe focused repair can be dispatched.

    Review details

    Best possible solution:

    Capture a current-main gateway transport trace for an errored job with failureAlert.after: 1, then make the cron lifecycle persist a typed requested/success/failure/timeout result at the alert owner boundary rather than inferring it from pre-send state.

    Do we have a high-confidence way to reproduce the issue?

    Yes for the source-level observability defect: current main records the alert state before it fires the asynchronous sender. No current-main transport reproduction yet proves the reported external non-delivery.

    Is this the best way to solve the issue?

    No: changing dispatch based only on not-requested would duplicate a path current main already invokes; the maintainable fix is to record the actual post-send outcome after validating it through the gateway boundary.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • There is no current-main gateway/channel trace showing whether the reporter’s real alert delivery fails after dispatch; the stored not-requested value is not diagnostic for that question.
    • The shallow checkout cannot establish a complete pre-release history or a fix/release provenance chain because required promisor objects were unavailable.

    Codex review notes: model internal, reasoning high; reviewed against e5d4fe02a46a.

    Label changes

    Label changes:

    • remove clawsweeper:needs-product-decision: Current issue advisory state no longer selects this label.

    Label justifications:

    • P1: Configured alerts for failed scheduled work can be silent or indistinguishable from an unattempted alert.
    • impact:message-loss: The affected behavior is delivery of configured failure notifications to an operator channel.
    Evidence reviewed

    What I checked:

    • Current dispatch path: For an error outcome, the cron lifecycle increments the failure streak and invokes the per-job failure-alert path; gateway wiring routes that request to strict channel announce or webhook delivery. (src/cron/service/timer-outcomes.ts:143, e5d4fe02a46a)
    • Status is recorded too early: The stored failure-notification state is resolved before the subsequent failure-alert call, so not-requested does not prove that the configured alert was not dispatched. (src/cron/service/timer-outcomes.ts:116, e5d4fe02a46a)
    • Outcome persistence gap: The alert sender is intentionally queued after durable bookkeeping and its promise is not awaited or returned as a typed result, leaving no recorded send outcome for this path. (src/cron/service/failure-alerts.ts:187, e5d4fe02a46a)
    • Existing source coverage: Current tests cover an after: 1 error invoking the sender and durable cooldown bookkeeping, but use a stubbed sender and do not prove a gateway transport outcome is persisted. (src/cron/service.failure-alert.test.ts:635, e5d4fe02a46a)
    • Release and related-work check: The latest release is v2026.7.1-2 at 0790d9f, which a commenter reports as affected. Closed-unmerged PR 95129 proposed outcome persistence, while merged PR 96615 concerns enabled-default configuration round-tripping rather than this explicit alert path. (0790d9f593ad)

    Likely related people:

    • Gio Della-Libera: Reachable blame for the current cron alert files stops at a shallow-history boundary attributed to this contributor; the boundary is useful routing context but not causal provenance. (role: recent source snapshot contributor; confidence: low; commits: 7774f9a36c12; files: src/cron/service/timer-outcomes.ts, src/cron/service/failure-alerts.ts, src/gateway/server-cron-notifications.ts)
    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.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Jun 11, 2026
  3. 6 remaining items

  4. added
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    and removed
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jul 26, 2026
  5. removed
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    on Aug 12, 2026
  6. self-assigned this
    on Aug 12, 2026
  7. vincentkoc commented on Aug 12, 2026

    @vincentkoc
    Member

    Fixed and shipped.

    Root cause: a per-job failureAlert incorrectly inherited the job delivery’s bestEffort suppression, so an explicitly requested alert could be skipped. PR #115762 landed the owner-boundary fix: current main suppresses inherited alert noise only, while explicit per-job alerts still run. Its real scheduler-watchdog regression covers the reported runtime-plugins stall and proves exactly one Telegram failure-alert send to the configured target.

    The fix first shipped in v2026.7.2-beta.6. The run’s delivery_status: not-requested is completion-delivery bookkeeping, not a failure-alert transport trace, so that value was not itself evidence that the alert path was unrequested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions