Repository navigation
fix: stop expected automation skips from posting did-not-start notices - #194276
Conversation
Every skipped run posted 'Automation "<name>" did not start: ... resolve the cause' into the owner conversation, including a run outside the job's active hours or an idle-only run deferred while the agent was busy. For a job that runs in its owner session the notice also entered the next run's context, so announced replies repeated and multiplied it. Carry the admission deferral reason in the finished event context and skip the notice for those scheduled deferrals; run history still records them. Refs openclaw#194261
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesSuppresses owner-conversation notices for expected active-hours and busy automation deferrals while retaining run history and completion webhooks. Example: The heartbeat automation runs three times outside its active hours, then runs once inside its window.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — suspected predecessor, not a causality claim: source commit Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this PR provides a focused, demonstrated fix for automation-notice feedback still present on current main, with no introduced defects found. Exact-head CI remains blocked by a failure-alert assertion independently reported on main. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe cron executor classifies admission outcomes, finalization publishes terminal events with transient context, and the Gateway notification handler decides whether to write an owner-conversation notice or send a completion webhook. flowchart TD
A[Cron executor] --> B[Run finalization]
B --> C[Run history]
B --> D[Terminal event and transient context]
D --> E[Gateway notification handler]
E --> F[Owner conversation]
E --> G[Completion webhook]
Technical reviewBest possible solution: Land the existing transient-context fix while preserving genuine non-start notices, scheduling, history, and webhook behavior. Do we have a high-confidence way to reproduce the issue? The executor-to-notifier path establishes the failure on current main, and the supplied real-Gateway comparison demonstrates the notice and subsequent model-input contamination before the fix. Is this the best way to solve the issue? The patch is the smallest complete fix: preserve the scheduler's existing deferral classification through transient event context and let the existing notification owner suppress only those expected outcomes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ee3f5a72fb75. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +12, Tests 0. Total +12 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 18, 2026, 1:41 AM ET / 06:41 UTC (Revision 5). |
|
Added raw terminal output from a fresh live run in place of the typeset table. The run used an isolated source Gateway on current main @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged current main ( @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Runtime proof: real Gateway from source, isolated state, local Responses provider recording each model request (harness steps in the PR body). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Maintainer override: Failing case: The PR cannot reach this case: the test runs execution errors (no |
|
Thanks @wr-web for the fix and @slatem for the report. This is merged in 4b0d39b: expected automation deferrals (outside active hours, or a busy target) no longer post a "did not start" notice into the job's own session, so the next run no longer reads them and Slack output no longer snowballs. Real failures to start still notify. |
openclaw#194276) Root cause: src/gateway/server-cron-notifications.ts:581 treats every skipped run as "did not start", because src/cron/service/timer-outcome-finalization.ts:153 never forwards the executor's existing `admissionDeferredReason` ("active-hours" or "busy") in the transient CronEventContext, so expected deferrals are written into the owner conversation as failures. Fixes openclaw#194261. Thanks @slatem for the detailed report and @wr-web for the fix. ## What Problem This Solves Since 2026.11.5-beta.1, every skipped automation run writes this notice into the job's owner conversation: > Automation "<name>" did not start: <reason> Check automation history, resolve the cause, then run it again. That includes scheduled deferrals that need no fixing: a tick outside the job's active hours, or an idle-only run deferred while the agent is busy. For heartbeat-style jobs whose session target is the agent's own main session, the notice lands in the session the next run executes in. The next announced reply repeats it, and the copies multiply every cycle. The reporter saw 163 Slack messages in about 25 minutes, each with up to 26 copies. ## User Impact Active-hours and busy deferrals no longer post a "did not start" notice, so they no longer feed the next run. Run history still records them as skipped with the same summary, and completion webhooks are unchanged. Other unstarted outcomes keep the notice: preparation or admission errors, and skips without a deferral reason. ## Why This Change Was Made The executor already classifies these outcomes with `admissionDeferredReason` (timer-execution.ts). Finalization now forwards that fact in the transient CronEventContext, next to `runNotStarted` and `quietTrigger`; it is not projected into the public CronEvent. The notifier skips the conversation notice when the reason is present. No new classifier, wording, setting or stored state. ## Evidence Real Gateway from source (`ocx src`), isolated state, deterministic local Responses provider that records every model request. A heartbeat job (every 1h, session target `session:agent:main:main`, active hours excluding now) is run three times, then its active hours are cleared and it runs once more (the next in-hours run). Control: a second job in the same session with `skipIfScratchEmpty` and an explicitly empty scratch, which skips without a deferral reason. | | main bec4cf3 | this PR a0b0a95 | | --- | --- | --- | | 3 active-hours runs | skipped, "Outside this automation's active hours" | same | | "did not start" notices in the session | 3 | 0 | | copies of the notice in the next run's model input | 3 | 0 | | control: scratch-empty skip notice | written (3 -> 4) | written (0 -> 1) | Raw output from both runs: openclaw#194276 (comment) - `src/gateway/server-cron-notifications.test.ts`: the existing conversation-outcome table gains active-hours and busy rows that expect no conversation commit while the completion webhook is still sent. Both rows fail on main and pass here (29/29). Test lines net 0. - Production change: +12 lines across three files, no deletions. - The contributor's earlier Windows proof (isolated source Gateway, CLI `cron run --wait`) showed the same result: the notice in the main session's transcript tables on main, none with this change. Merge danger: two-way door. A revert restores the old notices; nothing is stored or migrated. Blast radius: owner-conversation notices for skipped cron runs only. Co-authored-by: Ayaan Zaidi <[email protected]>
#194276) Root cause: src/gateway/server-cron-notifications.ts:581 treats every skipped run as "did not start", because src/cron/service/timer-outcome-finalization.ts:153 never forwards the executor's existing `admissionDeferredReason` ("active-hours" or "busy") in the transient CronEventContext, so expected deferrals are written into the owner conversation as failures. Fixes #194261. Thanks @slatem for the detailed report and @wr-web for the fix. ## What Problem This Solves Since 2026.11.5-beta.1, every skipped automation run writes this notice into the job's owner conversation: > Automation "<name>" did not start: <reason> Check automation history, resolve the cause, then run it again. That includes scheduled deferrals that need no fixing: a tick outside the job's active hours, or an idle-only run deferred while the agent is busy. For heartbeat-style jobs whose session target is the agent's own main session, the notice lands in the session the next run executes in. The next announced reply repeats it, and the copies multiply every cycle. The reporter saw 163 Slack messages in about 25 minutes, each with up to 26 copies. ## User Impact Active-hours and busy deferrals no longer post a "did not start" notice, so they no longer feed the next run. Run history still records them as skipped with the same summary, and completion webhooks are unchanged. Other unstarted outcomes keep the notice: preparation or admission errors, and skips without a deferral reason. ## Why This Change Was Made The executor already classifies these outcomes with `admissionDeferredReason` (timer-execution.ts). Finalization now forwards that fact in the transient CronEventContext, next to `runNotStarted` and `quietTrigger`; it is not projected into the public CronEvent. The notifier skips the conversation notice when the reason is present. No new classifier, wording, setting or stored state. ## Evidence Real Gateway from source (`ocx src`), isolated state, deterministic local Responses provider that records every model request. A heartbeat job (every 1h, session target `session:agent:main:main`, active hours excluding now) is run three times, then its active hours are cleared and it runs once more (the next in-hours run). Control: a second job in the same session with `skipIfScratchEmpty` and an explicitly empty scratch, which skips without a deferral reason. | | main 5e677ba | this PR a0b0a95 | | --- | --- | --- | | 3 active-hours runs | skipped, "Outside this automation's active hours" | same | | "did not start" notices in the session | 3 | 0 | | copies of the notice in the next run's model input | 3 | 0 | | control: scratch-empty skip notice | written (3 -> 4) | written (0 -> 1) | Raw output from both runs: #194276 (comment) - `src/gateway/server-cron-notifications.test.ts`: the existing conversation-outcome table gains active-hours and busy rows that expect no conversation commit while the completion webhook is still sent. Both rows fail on main and pass here (29/29). Test lines net 0. - Production change: +12 lines across three files, no deletions. - The contributor's earlier Windows proof (isolated source Gateway, CLI `cron run --wait`) showed the same result: the notice in the main session's transcript tables on main, none with this change. Merge danger: two-way door. A revert restores the old notices; nothing is stored or migrated. Blast radius: owner-conversation notices for skipped cron runs only. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 4b0d39b) Co-authored-by: RomneyDa <[email protected]>
…"did not start" notices (#202390) Root cause: src/cron/service/timer-execution.ts:220 (and its twin in src/cron/session-run.ts:224) returns `status: "skipped"` when `skipIfScratchEmpty` finds an explicitly empty checklist, and every skipped run is a failure downstream: `resolveCronCompletionStatus` maps skipped to `completionStatus: "failed"`, run storage records it as failed, it counts toward skipped-run alerts, and the Gateway posts "did not start" for any skipped run without an admission-deferral reason. Fixes #202350. Thanks @herosuncy for the clear report and repro. ## What Problem This Solves A heartbeat-style automation with "Skip empty scratch" on and the default comments-only checklist skips every interval, as intended. But each skip is recorded as a failed run, and the owner conversation gets `Automation "heartbeat-main" did not start: Automation scratch is explicitly empty. Check automation history, resolve the cause, then run it again.` every 30 minutes. An idle heartbeat looks broken, and the only workaround was disabling it. ## User Impact An empty checklist now completes quietly: run history shows `status: "ok"`, `completionStatus: "succeeded"` and the same summary `Automation scratch is explicitly empty`, the model is still not called, no "did not start" notice is posted, and it no longer counts toward skipped-run alerts. Real start failures (for example a model that is not configured) still record a failed run and still post the notice. ## Why This Change Was Made The skip is a deliberate "nothing to do" decision, not a failed start. The cron outcome model has no non-failure skipped state, but it already has one for a run that completes with nothing to deliver: `status: "ok"` with a delivery suppression reason (the same outcome a heartbeat turn with nothing to report records). Both empty-scratch producers now return that outcome with the existing `"empty"` suppression reason, so completion, storage, failure alerts and the conversation notice all treat it as a quiet completion through their existing rules. The primary webhook already ignored skips that never started (#200032); its guard now ignores any non-error run that never started, so the empty-checklist summary is still not POSTed as output. No new status, field, wording or stored shape. Behavior notes: `lastRunStatus` for these ticks is `ok` instead of `skipped`, and `consecutiveSkipped` no longer grows. A one-shot (`at`) job with `deleteAfterRun` and an empty checklist is now deleted like any other succeeded one-shot instead of being kept disabled; it was already consumed and never replayed. History: the skipped return came with the Doctor heartbeat migration (ec5d369, #179387). It predates the "did not start" notice, and #194276 only kept the empty-scratch notice as an untouched control while fixing active-hours/busy deferrals, so recording it as a failure was never a product decision. ## Evidence Real Gateway from source (`ocx src`), isolated state, deterministic local Responses provider that logs every model request, and a process-local Gateway clock stepped past each due time (the system clock is untouched). Job from the issue: every 30 min, `sessionTarget: session:agent:main:main`, `skipIfScratchEmpty: true`, scratch = the issue's comments-only template. | | main e99e848 | this PR 0519148 | | --- | --- | --- | | 2 scheduled ticks of heartbeat-main | `skipped` / `failed` x2 | `ok` / `succeeded` x2, same summary | | job state | `consecutiveSkipped: 2` | `consecutiveSkipped: 0` | | "did not start" notices in the session | 0 -> 2 | 0 -> 0 | | model requests during the ticks | 1 -> 1 | 1 -> 1 | | control: checklist with a real item | runs the turn (`ok`/`succeeded`, model called) | same | | control: model override on an unconfigured provider | `error`/`failed` + "did not start" notice | same | Observed output: #202390 (comment) - `src/cron/service.runs-one-shot-main-job-disables-it.test.ts`: the existing scratch-empty one-shot case now asserts `ok`/`succeeded` history and no skip counter; it fails on main and passes here. - `src/cron/service.trigger-eval.test.ts`: the existing webhook case still proves no POST for the empty checklist. - Production: +7/-4 lines in three files. Tests: +9/-4 (the one regression). Merge danger: two-way door. Nothing is migrated; a revert restores skipped/failed recording for later ticks, and rows written meanwhile stay `ok`/`succeeded`. Blast radius: automations with `skipIfScratchEmpty` and an empty checklist (run history status, completion, notices, skip alerts, `deleteAfterRun` one-shots). Co-authored-by: Ayaan Zaidi <[email protected]>
…"did not start" notices (openclaw#202390) Root cause: src/cron/service/timer-execution.ts:220 (and its twin in src/cron/session-run.ts:224) returns `status: "skipped"` when `skipIfScratchEmpty` finds an explicitly empty checklist, and every skipped run is a failure downstream: `resolveCronCompletionStatus` maps skipped to `completionStatus: "failed"`, run storage records it as failed, it counts toward skipped-run alerts, and the Gateway posts "did not start" for any skipped run without an admission-deferral reason. Fixes openclaw#202350. Thanks @herosuncy for the clear report and repro. ## What Problem This Solves A heartbeat-style automation with "Skip empty scratch" on and the default comments-only checklist skips every interval, as intended. But each skip is recorded as a failed run, and the owner conversation gets `Automation "heartbeat-main" did not start: Automation scratch is explicitly empty. Check automation history, resolve the cause, then run it again.` every 30 minutes. An idle heartbeat looks broken, and the only workaround was disabling it. ## User Impact An empty checklist now completes quietly: run history shows `status: "ok"`, `completionStatus: "succeeded"` and the same summary `Automation scratch is explicitly empty`, the model is still not called, no "did not start" notice is posted, and it no longer counts toward skipped-run alerts. Real start failures (for example a model that is not configured) still record a failed run and still post the notice. ## Why This Change Was Made The skip is a deliberate "nothing to do" decision, not a failed start. The cron outcome model has no non-failure skipped state, but it already has one for a run that completes with nothing to deliver: `status: "ok"` with a delivery suppression reason (the same outcome a heartbeat turn with nothing to report records). Both empty-scratch producers now return that outcome with the existing `"empty"` suppression reason, so completion, storage, failure alerts and the conversation notice all treat it as a quiet completion through their existing rules. The primary webhook already ignored skips that never started (openclaw#200032); its guard now ignores any non-error run that never started, so the empty-checklist summary is still not POSTed as output. No new status, field, wording or stored shape. Behavior notes: `lastRunStatus` for these ticks is `ok` instead of `skipped`, and `consecutiveSkipped` no longer grows. A one-shot (`at`) job with `deleteAfterRun` and an empty checklist is now deleted like any other succeeded one-shot instead of being kept disabled; it was already consumed and never replayed. History: the skipped return came with the Doctor heartbeat migration (b2a65a8, openclaw#179387). It predates the "did not start" notice, and openclaw#194276 only kept the empty-scratch notice as an untouched control while fixing active-hours/busy deferrals, so recording it as a failure was never a product decision. ## Evidence Real Gateway from source (`ocx src`), isolated state, deterministic local Responses provider that logs every model request, and a process-local Gateway clock stepped past each due time (the system clock is untouched). Job from the issue: every 30 min, `sessionTarget: session:agent:main:main`, `skipIfScratchEmpty: true`, scratch = the issue's comments-only template. | | main 704d0b3 | this PR 0519148 | | --- | --- | --- | | 2 scheduled ticks of heartbeat-main | `skipped` / `failed` x2 | `ok` / `succeeded` x2, same summary | | job state | `consecutiveSkipped: 2` | `consecutiveSkipped: 0` | | "did not start" notices in the session | 0 -> 2 | 0 -> 0 | | model requests during the ticks | 1 -> 1 | 1 -> 1 | | control: checklist with a real item | runs the turn (`ok`/`succeeded`, model called) | same | | control: model override on an unconfigured provider | `error`/`failed` + "did not start" notice | same | Observed output: openclaw#202390 (comment) - `src/cron/service.runs-one-shot-main-job-disables-it.test.ts`: the existing scratch-empty one-shot case now asserts `ok`/`succeeded` history and no skip counter; it fails on main and passes here. - `src/cron/service.trigger-eval.test.ts`: the existing webhook case still proves no POST for the empty checklist. - Production: +7/-4 lines in three files. Tests: +9/-4 (the one regression). Merge danger: two-way door. Nothing is migrated; a revert restores skipped/failed recording for later ticks, and rows written meanwhile stay `ok`/`succeeded`. Blast radius: automations with `skipIfScratchEmpty` and an empty checklist (run history status, completion, notices, skip alerts, `deleteAfterRun` one-shots). Co-authored-by: Ayaan Zaidi <[email protected]>
openclaw#194276) Root cause: src/gateway/server-cron-notifications.ts:581 treats every skipped run as "did not start", because src/cron/service/timer-outcome-finalization.ts:153 never forwards the executor's existing `admissionDeferredReason` ("active-hours" or "busy") in the transient CronEventContext, so expected deferrals are written into the owner conversation as failures. Fixes openclaw#194261. Thanks @slatem for the detailed report and @wr-web for the fix. ## What Problem This Solves Since 2026.11.5-beta.1, every skipped automation run writes this notice into the job's owner conversation: > Automation "<name>" did not start: <reason> Check automation history, resolve the cause, then run it again. That includes scheduled deferrals that need no fixing: a tick outside the job's active hours, or an idle-only run deferred while the agent is busy. For heartbeat-style jobs whose session target is the agent's own main session, the notice lands in the session the next run executes in. The next announced reply repeats it, and the copies multiply every cycle. The reporter saw 163 Slack messages in about 25 minutes, each with up to 26 copies. ## User Impact Active-hours and busy deferrals no longer post a "did not start" notice, so they no longer feed the next run. Run history still records them as skipped with the same summary, and completion webhooks are unchanged. Other unstarted outcomes keep the notice: preparation or admission errors, and skips without a deferral reason. ## Why This Change Was Made The executor already classifies these outcomes with `admissionDeferredReason` (timer-execution.ts). Finalization now forwards that fact in the transient CronEventContext, next to `runNotStarted` and `quietTrigger`; it is not projected into the public CronEvent. The notifier skips the conversation notice when the reason is present. No new classifier, wording, setting or stored state. ## Evidence Real Gateway from source (`ocx src`), isolated state, deterministic local Responses provider that records every model request. A heartbeat job (every 1h, session target `session:agent:main:main`, active hours excluding now) is run three times, then its active hours are cleared and it runs once more (the next in-hours run). Control: a second job in the same session with `skipIfScratchEmpty` and an explicitly empty scratch, which skips without a deferral reason. | | main 5e677ba | this PR a0b0a95 | | --- | --- | --- | | 3 active-hours runs | skipped, "Outside this automation's active hours" | same | | "did not start" notices in the session | 3 | 0 | | copies of the notice in the next run's model input | 3 | 0 | | control: scratch-empty skip notice | written (3 -> 4) | written (0 -> 1) | Raw output from both runs: openclaw#194276 (comment) - `src/gateway/server-cron-notifications.test.ts`: the existing conversation-outcome table gains active-hours and busy rows that expect no conversation commit while the completion webhook is still sent. Both rows fail on main and pass here (29/29). Test lines net 0. - Production change: +12 lines across three files, no deletions. - The contributor's earlier Windows proof (isolated source Gateway, CLI `cron run --wait`) showed the same result: the notice in the main session's transcript tables on main, none with this change. Merge danger: two-way door. A revert restores the old notices; nothing is stored or migrated. Blast radius: owner-conversation notices for skipped cron runs only. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 4b0d39b) Release adaptation: No prerequisite; conflict in finalization combines reason propagation with unrelated durableNextRunAtMsByJobId map absent in candidate. Take only reason propagation, not that map or scheduler refactor. Co-authored-by: RomneyDa <[email protected]>
…"did not start" notices (#202390) Root cause: src/cron/service/timer-execution.ts:220 (and its twin in src/cron/session-run.ts:224) returns `status: "skipped"` when `skipIfScratchEmpty` finds an explicitly empty checklist, and every skipped run is a failure downstream: `resolveCronCompletionStatus` maps skipped to `completionStatus: "failed"`, run storage records it as failed, it counts toward skipped-run alerts, and the Gateway posts "did not start" for any skipped run without an admission-deferral reason. Fixes #202350. Thanks @herosuncy for the clear report and repro. ## What Problem This Solves A heartbeat-style automation with "Skip empty scratch" on and the default comments-only checklist skips every interval, as intended. But each skip is recorded as a failed run, and the owner conversation gets `Automation "heartbeat-main" did not start: Automation scratch is explicitly empty. Check automation history, resolve the cause, then run it again.` every 30 minutes. An idle heartbeat looks broken, and the only workaround was disabling it. ## User Impact An empty checklist now completes quietly: run history shows `status: "ok"`, `completionStatus: "succeeded"` and the same summary `Automation scratch is explicitly empty`, the model is still not called, no "did not start" notice is posted, and it no longer counts toward skipped-run alerts. Real start failures (for example a model that is not configured) still record a failed run and still post the notice. ## Why This Change Was Made The skip is a deliberate "nothing to do" decision, not a failed start. The cron outcome model has no non-failure skipped state, but it already has one for a run that completes with nothing to deliver: `status: "ok"` with a delivery suppression reason (the same outcome a heartbeat turn with nothing to report records). Both empty-scratch producers now return that outcome with the existing `"empty"` suppression reason, so completion, storage, failure alerts and the conversation notice all treat it as a quiet completion through their existing rules. The primary webhook already ignored skips that never started (#200032); its guard now ignores any non-error run that never started, so the empty-checklist summary is still not POSTed as output. No new status, field, wording or stored shape. Behavior notes: `lastRunStatus` for these ticks is `ok` instead of `skipped`, and `consecutiveSkipped` no longer grows. A one-shot (`at`) job with `deleteAfterRun` and an empty checklist is now deleted like any other succeeded one-shot instead of being kept disabled; it was already consumed and never replayed. History: the skipped return came with the Doctor heartbeat migration (ec5d369, #179387). It predates the "did not start" notice, and #194276 only kept the empty-scratch notice as an untouched control while fixing active-hours/busy deferrals, so recording it as a failure was never a product decision. ## Evidence Real Gateway from source (`ocx src`), isolated state, deterministic local Responses provider that logs every model request, and a process-local Gateway clock stepped past each due time (the system clock is untouched). Job from the issue: every 30 min, `sessionTarget: session:agent:main:main`, `skipIfScratchEmpty: true`, scratch = the issue's comments-only template. | | main e99e848 | this PR 0519148 | | --- | --- | --- | | 2 scheduled ticks of heartbeat-main | `skipped` / `failed` x2 | `ok` / `succeeded` x2, same summary | | job state | `consecutiveSkipped: 2` | `consecutiveSkipped: 0` | | "did not start" notices in the session | 0 -> 2 | 0 -> 0 | | model requests during the ticks | 1 -> 1 | 1 -> 1 | | control: checklist with a real item | runs the turn (`ok`/`succeeded`, model called) | same | | control: model override on an unconfigured provider | `error`/`failed` + "did not start" notice | same | Observed output: #202390 (comment) - `src/cron/service.runs-one-shot-main-job-disables-it.test.ts`: the existing scratch-empty one-shot case now asserts `ok`/`succeeded` history and no skip counter; it fails on main and passes here. - `src/cron/service.trigger-eval.test.ts`: the existing webhook case still proves no POST for the empty checklist. - Production: +7/-4 lines in three files. Tests: +9/-4 (the one regression). Merge danger: two-way door. Nothing is migrated; a revert restores skipped/failed recording for later ticks, and rows written meanwhile stay `ok`/`succeeded`. Blast radius: automations with `skipIfScratchEmpty` and an empty checklist (run history status, completion, notices, skip alerts, `deleteAfterRun` one-shots). Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit ccc83c7) Operator-requested 2026.11.10 stable backport (Dallin, 2026-11-24 04:15). Clean apply. Later main mentions: none. Co-authored-by: RomneyDa <[email protected]>
Root cause: src/gateway/server-cron-notifications.ts:581 treats every skipped run as "did not start", because src/cron/service/timer-outcome-finalization.ts:153 never forwards the executor's existing
admissionDeferredReason("active-hours" or "busy") in the transient CronEventContext, so expected deferrals are written into the owner conversation as failures.Fixes #194261. Thanks @slatem for the detailed report and @wr-web for the fix.
What Problem This Solves
Since 2026.11.5-beta.1, every skipped automation run writes this notice into the job's owner conversation:
That includes scheduled deferrals that need no fixing: a tick outside the job's active hours, or an idle-only run deferred while the agent is busy. For heartbeat-style jobs whose session target is the agent's own main session, the notice lands in the session the next run executes in. The next announced reply repeats it, and the copies multiply every cycle. The reporter saw 163 Slack messages in about 25 minutes, each with up to 26 copies.
User Impact
Active-hours and busy deferrals no longer post a "did not start" notice, so they no longer feed the next run. Run history still records them as skipped with the same summary, and completion webhooks are unchanged. Other unstarted outcomes keep the notice: preparation or admission errors, and skips without a deferral reason.
Why This Change Was Made
The executor already classifies these outcomes with
admissionDeferredReason(timer-execution.ts). Finalization now forwards that fact in the transient CronEventContext, next torunNotStartedandquietTrigger; it is not projected into the public CronEvent. The notifier skips the conversation notice when the reason is present. No new classifier, wording, setting or stored state.Evidence
Real Gateway from source (
ocx src), isolated state, deterministic local Responses provider that records every model request. A heartbeat job (every 1h, session targetsession:agent:main:main, active hours excluding now) is run three times, then its active hours are cleared and it runs once more (the next in-hours run). Control: a second job in the same session withskipIfScratchEmptyand an explicitly empty scratch, which skips without a deferral reason.Raw output from both runs: #194276 (comment)
src/gateway/server-cron-notifications.test.ts: the existing conversation-outcome table gains active-hours and busy rows that expect no conversation commit while the completion webhook is still sent. Both rows fail on main and pass here (29/29). Test lines net 0.cron run --wait) showed the same result: the notice in the main session's transcript tables on main, none with this change.Merge danger: two-way door. A revert restores the old notices; nothing is stored or migrated. Blast radius: owner-conversation notices for skipped cron runs only.