-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug] v2026.6.6: Cron scheduler loads 0 jobs after upgrade — SQLite WAL not committed at first startup #93032
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.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.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.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.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
Summary
After upgrading to v2026.6.6, the cron scheduler initialises with 0 jobs in memory even though
state/openclaw.sqlitecontains the correct job count incron_jobs. Thecron listtool returns an empty array. A second restart (bootout + bootstrap) fixes the issue.Environment
Steps to Reproduce
cron listreturns{"jobs": []}(0 jobs)SELECT COUNT(*) FROM cron_jobs;→ 73cron listnow returns all 73 jobs correctlyRoot Cause (suspected)
The v2026.6.6 migration runs synchronously during startup, writing jobs to SQLite's WAL file. The cron scheduler initialises before the WAL is checkpointed into the main database file. The in-process SQLite connection sees the pre-migration state (0 jobs); the WAL is invisible to the scheduler at the moment it reads.
On the second restart, the WAL has been checkpointed and the scheduler sees the full job list.
Verified: After running
PRAGMA wal_checkpoint(TRUNCATE)manually, the jobs were visible in external SQLite queries, but the running process still returned 0 via the cron API — confirming the issue is the in-memory scheduler state, not the on-disk data.Workaround
Do a second hard restart after upgrade:
launchctl bootout gui/501/ai.openclaw.gateway sleep 5 launchctl bootstrap gui/501 ~/Library/LaunchAgents/ai.openclaw.gateway.plist\n## Expected Behaviour
After a single restart, the scheduler should correctly load all migrated cron jobs from SQLite.
Impact
cron listreturns empty, gateway is healthyAffected Versions