Skip to content

[Bug]: openclaw cron status reports legacy storePath #91766

Closed

Description

@AaronFaby

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Hello,

Since 2026.6.1 cron jobs are stored in the state database (~/.openclaw/state/openclaw.sqlite). However the openclaw cron cli shows the legacy storePath:

OpenClaw 2026.6.5 (unknown) — I can't fix your code taste, but I can fix your build and your backlog.

│
◇
{
"enabled": true,
"storePath": "/home/node/.openclaw/cron/jobs.json",
"jobs": 6,
"nextWakeAtMs": 1781067600000
}

This was discovered by my claw when I asked it about the cron jobs.

This will confuse users and the agent into thinking the legacy json file is still the authoritative location for the cron job configurations.

Steps to reproduce

Run openclaw cron status

Expected behavior

storePath should reference the new state database instead of the legacy json file.

Actual behavior

Legacy json file is referenced.

OpenClaw version

2026.6.1

Operating system

Ubuntu 24.04

Install method

docker

Model

n/a

Provider / routing chain

n/a

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Activity

  1. clawsweeper commented on Jun 9, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 9, 2026, 5:01 PM ET / 21:01 UTC.

    Summary
    Keep open: current main and the latest release still expose the legacy cron storePath through cron.status, while the actual cron job store is already backed by the shared SQLite database.

    Reproducibility: yes. Source inspection shows cron.status() returns state.deps.storePath and the CLI prints that response directly; running openclaw cron status against current main should reproduce the reported legacy path.

    Next step
    This is a narrow source-backed bug with clear files, validation, and no linked implementation PR in the provided context.

    Review details

    Best possible solution:

    Update the cron status payload and CLI output to report the canonical SQLite-backed storage identity, keeping the logical cron store key separate from the actual database file and covering the behavior with regression tests.

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

    Yes. Source inspection shows cron.status() returns state.deps.storePath and the CLI prints that response directly; running openclaw cron status against current main should reproduce the reported legacy path.

    Is this the best way to solve the issue?

    Yes. The best fix is at the cron status/reporting boundary because cron persistence already uses SQLite; changing the storage layer would address the wrong problem.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • cron.status is a gateway/CLI JSON surface, so the fix should avoid silently removing a field that external scripts may parse; prefer explicit canonical storage reporting or carefully updated storePath semantics with focused tests.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 21410d1c3247.

    Label changes

    Label changes:

    • add P2: This is a normal-priority behavior bug in a core diagnostic command with limited blast radius but real operator and agent confusion.
    • add impact:other: The issue affects maintainer-visible diagnostic correctness for cron storage rather than data loss, security, message delivery, session state, or auth routing.
    • 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:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P2: This is a normal-priority behavior bug in a core diagnostic command with limited blast radius but real operator and agent confusion.
    • impact:other: The issue affects maintainer-visible diagnostic correctness for cron storage rather than data loss, security, message delivery, session state, or auth routing.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/cron/service.read-ops-nonblocking.test.ts src/cli/cron-cli.test.ts src/cron/cron-protocol-conformance.test.ts
    • git diff --check

    What I checked:

    • Issue report: The reporter shows openclaw cron status on 2026.6.5 returning storePath: /home/node/.openclaw/cron/jobs.json after cron storage moved to the shared SQLite state database.
    • Current main status payload: cron.status() still returns storePath: state.deps.storePath, so the gateway response exposes the logical legacy jobs path rather than the SQLite database path. (src/cron/service/ops.ts:256, 21410d1c3247)
    • CLI output path: The openclaw cron status command prints the cron.status gateway response directly, so the misleading field reaches users and agents without further transformation. (src/cli/cron-cli/register.cron-add.ts:37, 21410d1c3247)
    • Actual storage backend: Cron load reads rows from openOpenClawStateDatabase().db using the resolved store path only as a SQLite partition key. (src/cron/store.ts:64, 21410d1c3247)
    • Canonical database path: The shared state database helper resolves the database file as state/openclaw.sqlite. (src/state/openclaw-state-db.paths.ts:38, 21410d1c3247)
    • Current docs contract: The CLI docs say cron jobs, pending runtime state, and run history live in the shared SQLite state database, and legacy JSON files are imported once. Public docs: docs/cli/cron.md. (docs/cli/cron.md:146, 21410d1c3247)

    Likely related people:

    • Peter Steinberger: Recent git history shows repeated cron service, store, runtime cleanup, and cron docs work in the affected paths, including startup store churn and legacy runtime cleanup. (role: recent area contributor; confidence: high; commits: 1e1372027e4e, 19d0c2dd1d25, 9267e694f7; files: src/cron/service/ops.ts, src/cron/store.ts, docs/cli/cron.md)
    • Vincent Koc: Recent history shows release, automation docs, tasks, and cron-adjacent state work around the same database-first cron surface. (role: adjacent owner; confidence: medium; commits: 5181e4f7c82b, a804d234cd, e624fdcf0a; files: docs/automation/cron-jobs.md, docs/automation/tasks.md, src/cron/service/ops.ts)
    • Tyler Yust: Historical cron scheduler reliability and delivery consolidation commits are relevant background for the cron service contract, though not the freshest owner signal. (role: historical cron contributor; confidence: low; commits: d90cac990c, 38543d8196; files: src/cron/store.ts, src/cron/service/ops.ts, docs/automation/cron-jobs.md)
    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.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis 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.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 9, 2026
  3. added a commit that references this issue on Jun 9, 2026
    b1b23db
  4. added a commit that references this issue on Jun 11, 2026
    047785e
  5. added a commit that references this issue on Jun 12, 2026
    ba858ff
  6. locked as resolved and limited conversation to collaborators on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis 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.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions