Omniscio

Cron failure alerts (part 2)

The second half of Cron failure alerts: the settings that gate the card, how it interacts with the self-healing pipeline that can repair the job, and the developer reference for the feature.

On this page

What it is

The continuation of part 1. Part 1 covers what the card says and when one is raised; this page covers the settings that control it, its relationship to cron self-healing, and the code behind it.

Where to find it

The switches live in Settings → Notifications → Alert types. The code itself is named in the developer reference below.

How it behaves

Settings

Both settings live at Settings → Notifications, defined as optional booleans on AppSettings in types.ts (search cronFailureAlerts). The UI is in NotificationSettings.tsx (search cron-failure-alerts-enabled). Search-index entries: cron-failure-alerts-enabled and cron-failure-alerts-always-fire in settings-search-index.ts.

Setting Default What it does
cronFailureAlertsEnabled true Master toggle. When off, both the Windows toast AND the inbox card are suppressed. Existing pending rows stay in the inbox until the user acknowledges them; future failures of any job stop alerting.
cronFailureAlertsAlwaysFire false Bypass Focus Mode batching for the OS toast. When on, the producer passes bypassFocusMode: true so the toast pierces Focus Mode's count/time threshold and fires immediately. Does NOT bypass silenceUntil, the muted gate, or the master off.

The "Always fire" nested toggle is gated on the master being true — toggle the master off and the nested row is hidden.

Interaction with self-healing

When self-healing is enabled per-job and a heal lands in pending or spawned state, the failure-alert producer suppresses the alert insert for the same job (Skip condition 4 above). The heal pipeline owns the failure for the duration of its lifetime. The reasoning: a heal card in the inbox already tells the user "this job failed and Omniscio is trying to fix it," and a failure card next to it would be noise telling them the same thing twice.

The opposite direction also holds: a cron.failure_alert card in the inbox does not suppress heal creation. The order in notifyJobResult is insertOrBumpFailureAlert → createHealAttemptIfEligible, so the alert insert sees pre-existing heal attempts (the ones it must defer to) but the subsequent heal-eligibility gate sees no alert at all (alerts are not on the heal pipeline's radar).

If self-healing is off for a job, every failure produces an alert card; the heal hook never fires. If self-healing is on but the heal eligibility gate rejects (e.g. 3-strike cap, system-marked failure, one-off mode), no heal lands, so no heal card — and the alert card fires normally.

The detail pane's inline Turn on auto-fix control is the user-facing bridge from "I see the alert and want to set up auto-recovery" to actually turning the feature on — it flips healingEnabled: true on the job in place (no trip to the editor) and confirms with a success toast. It's only shown when the job currently has healingEnabled === false. Separately, the Fix with AI footer button opens a Start-session dialog to fix the job by hand right now — a normal Claude session pre-filled with the error (it pauses the job while you work). It's the hands-on counterpart to automatic self-heal; the sibling escalation card's own Fix it is what still triggers a one-off manual heal (see cron-self-healing.md § "Manual Fix it").

See cron-self-healing.md for the full heal pipeline flow.

Last verified 2026-10-05