CronCreate with durable: true silently falls back to session-only — no scheduled_tasks.json is ever written

Open 💬 0 comments Opened Jul 1, 2026 by PVMatsiras

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

  1. In a Claude Code session, call CronCreate with durable: true, e.g.:

``
CronCreate(cron="0 0 1 1 *", recurring=false, durable=true, prompt="test")
``

  1. 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."
  2. Call CronList — the job is listed with an explicit [session-only] tag despite durable: true having been requested.
  3. Check the project's .claude/ directory:
  • .claude/scheduled_tasks.json — does not exist.
  • .claude/scheduled_tasks.lockdoes 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}
``

  1. 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 durable argument'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 corresponding scheduled_tasks.json it 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.json write step is simply not implemented in the current build.

View original on GitHub ↗