Repository navigation
Description
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
- [Bug]: failureAlert silently drops when cron stalls in runtime-plugins phase — lastFailureNotificationDeliveryStatus="unknown", operator never sees the failure #89847 covers failureAlert being dropped when a run stalls in the runtime-plugins phase with status
"unknown"— but here even ordinary execution-timeout errors never request delivery, which looks broader. - Migration context may be relevant: v2026.6.5: Cron doctor preflight overwrites API-updated schedules with stale legacy JSON data #91944 / Cron run-history not persisted after 2026.6.x upgrade — runs/history.db + runs/index.db remain 0-byte; legacy runs/*.jsonl migrated to .migrated #91917. One hypothesis is that the cron-store SQLite migration didn't carry the failure-alert request path into the new runtime, since
delivery_statusstays at its initialnot-requestedvalue for every run, ok or errored.
Repro
- On 2026.6.5, configure any cron job with
failureAlert.after = 1and a channel target. - Force the run to error (e.g. a payload that exceeds
timeoutSeconds). - Observe: no notification;
cron_run_logs.delivery_status = 'not-requested'.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 11, 2026
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-requestedbefore 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
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-requestedwould 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:
not-requestedvalue is not diagnostic for that question.Codex review notes: model internal, reasoning high; reviewed against e5d4fe02a46a.
Label changes
Label changes:
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:
src/cron/service/timer-outcomes.ts:143, e5d4fe02a46a)not-requesteddoes not prove that the configured alert was not dispatched. (src/cron/service/timer-outcomes.ts:116, e5d4fe02a46a)src/cron/service/failure-alerts.ts:187, e5d4fe02a46a)after: 1error 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)Likely related people:
src/cron/service/timer-outcomes.ts,src/cron/service/failure-alerts.ts,src/gateway/server-cron-notifications.ts)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 autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.6 remaining items
vincentkoc commentedon Aug 12, 2026
Fixed and shipped.
Root cause: a per-job
failureAlertincorrectly inherited the job delivery’sbestEffortsuppression, so an explicitly requested alert could be skipped. PR #115762 landed the owner-boundary fix: currentmainsuppresses inherited alert noise only, while explicit per-job alerts still run. Its real scheduler-watchdog regression covers the reportedruntime-pluginsstall 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-requestedis completion-delivery bookkeeping, not a failure-alert transport trace, so that value was not itself evidence that the alert path was unrequested.