CronCreate with durable: true silently falls back to session-only — no scheduled_tasks.json is ever written
Environment
- Claude Code CLI version: 2.1.178
- OS: Windows 11 Pro (10.0.26200)
- Shell: PowerShell 7 (primary), Git Bash also in use
Summary
CronCreate accepts a durable parameter documented as: "true = persist to .claude/scheduled_tasks.json and survive restarts." Passing durable: true is silently ignored — the tool's own confirmation message reports the job as session-only every time, and no .claude/scheduled_tasks.json file is ever created. A .claude/scheduled_tasks.lock file is created, suggesting the durable-write code path is entered and a lock is acquired, but the actual persisted-store write never completes (or isn't implemented), and the failure is swallowed rather than surfaced.
Steps to reproduce
- In a Claude Code session, call
CronCreatewithdurable: true, e.g.:
````
CronCreate(cron="0 0 1 1 *", recurring=false, durable=true, prompt="test")
- Observe the tool result: "Scheduled one-shot task <id> (...). Session-only (not written to disk, dies when Claude exits). It will fire once then auto-delete."
- Call
CronList— the job is listed with an explicit[session-only]tag despitedurable: truehaving been requested. - Check the project's
.claude/directory:
.claude/scheduled_tasks.json— does not exist..claude/scheduled_tasks.lock— does exist, containing the current session's own sessionId/pid/procStart/acquiredAt, e.g.:
``json``
{"sessionId":"e58f79fe-4563-4f80-a2df-d1b4c84d8b96","pid":13616,"procStart":"639184895043176980","acquiredAt":1782943553392}
- Repeated the whole sequence a second time in the same session with a fresh job — identical result (session-only, lock file present, no json file).
Expected behavior
With durable: true, .claude/scheduled_tasks.json should be created/updated with the job definition, the job should survive a Claude Code restart, and the confirmation message should reflect durable status (not "session-only").
Actual behavior
- Tool result always reports session-only, regardless of the
durableargument's value. CronDelete's own tool description states it "Removes it from the in-memory session store" — no mention of a disk-backed store at all, consistent with durable persistence not being wired up (or being wired up but failing silently before the write).- A lock file is created and left behind (
scheduled_tasks.lock), but the correspondingscheduled_tasks.jsonit presumably guards is never written.
Impact
Any workflow that schedules a one-shot or recurring reminder intended to survive past the current session (e.g., "check back on a task that fires in 2 days") cannot actually rely on durable: true — it silently behaves like durable: false with no error or warning, which could lead someone to believe a reminder is safely persisted when it is not. Worked around in this instance by writing the reminder into a git-tracked project file (CONTEXT.md) instead of relying on CronCreate.
Suggested fix direction
- Surface a clear error/warning in the tool result if the durable write fails, rather than silently downgrading to session-only.
- Investigate whether the lock acquisition is failing to release/hand off correctly, or whether the
scheduled_tasks.jsonwrite step is simply not implemented in the current build.