-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Overview counts disabled cron jobs as failed when their last run ended in error #95716
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Overview reports a cron job as failed based on historical error state even when the job is currently disabled and has no next scheduled run.
Steps to reproduce
state.lastRunStatus = "error".consecutiveErrors > 0.enabled: falsenextRunAtMs: nullstate.lastRunStatus: "error"Expected behavior
Overview should distinguish current active failures from historical failures on disabled jobs.
A job with:
enabled: falsenextRunAtMs: nullshould not be counted in the top-level “cron jobs failed” summary purely because
lastRunStatusremainserror.If historical failure state is preserved, it should appear in detail views or as a separate disabled/historical state.
Actual behavior
A disabled cron job with no next run can still appear in Overview as a current failed cron job when its historical state remains:
state.lastRunStatus: "error"state.consecutiveErrors > 0This makes an intentionally retired job appear to be an active operational problem.
OpenClaw version
2026.6.9
Operating system
Linux 6.6.87.2-microsoft-standard-WSL2 (x64)
Install method
npm global / gateway runtime
Model
azure/gpt-5.4
Provider / routing chain
openclaw -> azure
Additional provider/model setup details
Observed on a cron job using
sessionTarget: "isolated"andpayload.kind: "agentTurn".The issue appears to be in Overview state derivation rather than provider-specific execution behavior.
Logs, screenshots, and evidence
Impact and severity
Affected: operators using Overview / top-level status to judge current cron health
Severity: Medium (operationally misleading status)
Frequency: Reproducible when a failed cron job is later intentionally disabled
Consequence: disabled jobs continue to appear as active failures, reducing trust in Overview as a current-actionability surface
Additional information
This looks like a state interpretation / presentation bug, not a scheduler execution bug.
Likely code areas to inspect:
Likely root cause:
Overview appears to treat
state.lastRunStatus === "error"as a current failure without first checking whether the job is still active (enabled === true).Suggested fix shape:
derive a clearer status model that separates:
lastRunStatus,consecutiveErrorsactive_failedvsdisabled_after_failureOnly
active_failedshould contribute to the top-level failed cron count.Related but not identical issues already in the tracker: