-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Description
Bug Report
Version: OpenClaw 2026.2.3-1
OS: Linux 6.17.0-1006-gcp (x64), Node v22.22.0
Summary
After disabling and re-enabling isolated cron jobs, nextRunAtMs continues to advance on each scheduled tick but no sessions are spawned. The jobs appear healthy in cron list but silently fail to execute.
Reproduction Steps
- Have working isolated
agentTurncron jobs (confirmed working before disable) - Disable jobs via
cron update(enabled: false) - Wait for one or more scheduled ticks to pass
- Re-enable jobs via
cron update(enabled: true) - Observe:
nextRunAtMsadvances on each tick,lastRunAtMsdoes NOT update, no sessions spawn
Expected Behavior
Re-enabled jobs should spawn sessions on their next scheduled tick.
Actual Behavior
Jobs enter a ghost state — the scheduler advances nextRunAtMs but never calls onTimer to spawn sessions. The state.running guard in the cron timer handler (around gateway-cli-D_8miTjF.js:3440-3470) may be stuck in a truthy state from the disable cycle.
Workaround
Manually sending a message to the cron session key unsticks the job permanently:
sessions_send(sessionKey="agent:<name>:cron:<jobId>", message="<heartbeat prompt>")
After this manual kick, subsequent scheduled ticks fire correctly — the fix is persistent, not one-shot.
Suspected Root Cause
The 2026.2.3 changelog includes significant cron-related changes that likely interact:
- Hard migration of isolated jobs to
announce/nonedelivery modes - Dropped legacy fields:
post-to-main,payloaddelivery types,atMsinputs - Default delivery changed to
announcefor isolatedagentTurnjobs - Tool suppression during announce delivery phase
- Auto-deletion of one-shot jobs after success
The migration may leave stale internal state (possibly state.running = true or missing delivery config) that prevents the timer handler from proceeding after a disable/enable cycle.
Timeline
- Jobs disabled at ~03:00 UTC, 2026-02-06
- Jobs re-enabled at ~03:30 UTC —
nextRunAtMsadvancing but no sessions - Manual kick via
sessions_sendat ~04:00 UTC — job unstuck - Subsequent scheduled ticks (04:05, 04:34 UTC) fired automatically ✅
Environment Details
- Jobs are
sessionTarget: "isolated"withpayload.kind: "agentTurn" - Delivery mode:
announce - Schedule:
cronkind withtz: "America/Phoenix" - Multiple jobs affected (tested with 2 independent agent crons)
Affected Job Configs
{
"schedule": { "kind": "cron", "expr": "3,18,33,48 * * * *", "tz": "America/Phoenix" },
"sessionTarget": "isolated",
"payload": { "kind": "agentTurn", "message": "..." },
"delivery": { "mode": "announce" }
}