Skip to content

[Bug]: Skipped automation runs appear as completed tasks #123784

Closed

Description

@steipete

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Automation runs recorded as skipped in cron.runs are projected as successful/Completed in the generic Tasks ledger.

Steps to reproduce

  1. Run an isolated automation whose runner returns status: "skipped" with a reason, such as an unavailable configured local model endpoint.
  2. Query cron.runs for that job.
  3. Query tasks.list for the corresponding automation task.
  4. Observe that the same durable run is skipped in cron history but completed in Tasks.

Expected behavior

cron.runs should preserve the cron-specific skipped result. Because the generic Task status vocabulary has no skipped state, Tasks should show the run as failed with the authoritative skip reason. Only cron ok should project as task success.

Actual behavior

The cron-to-task projector maps both ok and skipped to task succeeded, which Gateway and Control UI render as green Completed. A parallel no-history finalization path repeats the same mapping and drops skip reasons.

OpenClaw version

Current main at 727a4a621a2e28049bf9d78c2720198e1ba73fba.

Operating system

macOS 26.6.1

Install method

Source checkout using the repository test wrappers.

Model

Not model-specific.

Provider / routing chain

Not provider-specific.

Additional provider/model setup details

The defect is in the internal cron-to-task status projection after the runner has already produced a terminal result.

Logs

Expected task status: failed
Received task status: succeeded
Cron run detail/history status: skipped

Screenshots, recordings, and evidence

The regression is reproduced through the real SQLite task ledger and an isolated Gateway RPC path. The Gateway proof observes cron.runs: skipped and tasks.list: completed for the same run before the repair.

Impact and severity

Affected: operators using Tasks, the Control UI task rail, or task status summaries for automation runs.

Severity: medium. The automation did not run successfully, but the task is shown as successful.

Frequency: every cron terminal result classified as skipped.

Consequence: operators can miss unavailable-provider, preflight, or other skip reasons because Tasks presents the run as completed.

Additional information

The canonical repair is net-negative production code: map only cron ok to task success, keep timeout/cancellation/quiet-trigger semantics unchanged, and reuse the canonical projector in no-history finalization while preserving the skip reason.

Activity

  1. self-assigned this
    on Aug 14, 2026
  2. added
    maintainer
    on Aug 14, 2026
  3. added
    clawsweeper:linked-pr-open
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    P2
    on Aug 14, 2026
  4. clawsweeper commented on Aug 14, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 14, 2026, 2:46 PM ET / 18:46 UTC.

    Summary
    Current main still projects skipped cron runs as successful generic tasks. The linked open PR is the focused canonical repair, and the protected maintainer label requires explicit maintainer handling rather than closing this issue.

    Reproducibility: yes. —current main has two direct projection paths that map cron skipped to generic success, and existing regression coverage demonstrates the mismatched task/history states.

    Next step
    The open linked PR already owns this focused repair, so dispatching another fix lane would duplicate active work.

    Review details

    Best possible solution:

    Review and land the linked repair so only cron ok becomes generic task success, while skipped outcomes retain their authoritative reason across both terminal paths.

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

    Yes—current main has two direct projection paths that map cron skipped to generic success, and existing regression coverage demonstrates the mismatched task/history states.

    Is this the best way to solve the issue?

    Yes—the linked PR’s canonical mapping approach is the narrowest repair because the generic task vocabulary has no skipped state and both terminal paths share the same invariant.

    AGENTS.md: found and applied where relevant.

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

    Label changes

    Label changes:

    • add P2: Skipped automation runs are consistently shown as successful in generic task views, a bounded but concrete operator-visible behavior bug.
    • add impact:other: The affected class is incorrect automation outcome classification in task summaries, outside the more specific owned impact labels.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:linked-pr-open: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.

    Label justifications:

    • P2: Skipped automation runs are consistently shown as successful in generic task views, a bounded but concrete operator-visible behavior bug.
    • impact:other: The affected class is incorrect automation outcome classification in task summaries, outside the more specific owned impact labels.
    Evidence reviewed

    What I checked:

    • Current main status mapper: Both cron ok and skipped map to generic task succeeded, directly causing the reported mismatch. (src/cron/task-run-detail.ts:267, c6b339460284)
    • Independent no-history path: The no-history finalizer separately maps skipped to succeeded and only preserves an error for error status, dropping a skip reason. (src/cron/service/task-runs.ts:324, c6b339460284)
    • Existing test encodes the defect: A skipped cron event is asserted as task succeeded while its task detail and cron history remain skipped. (src/cron/service/task-runs.test.ts:449, c6b339460284)
    • User-visible task conversion: The Gateway exposes succeeded as completed, explaining why generic task consumers show a skipped run as completed. (src/gateway/server-methods/task-summary.ts:18, c6b339460284)
    • Canonical active repair: The supplied timeline identifies the open linked PR as explicitly closing this issue and covering the ordinary and no-history projections.
    • History and release check: Blame attributes the current mapper and duplicate finalizer to the same current-source commit; that commit is not contained in v2026.7.1-2, and no fix release is identified. (src/cron/task-run-detail.ts:267, 493a3e46b3f2)

    Likely related people:

    • steipete: Blame attributes both faulty mappings to this commit; the issue and linked repair also concern the same cron/task-ledger surface. (role: current source-line author and recent cron/task-ledger contributor; confidence: high; commits: 493a3e46b3f2; files: src/cron/task-run-detail.ts, src/cron/service/task-runs.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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2clawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:otherissue-rating: 🦞 diamond lobstermaintainer

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions