CronCreate durable:true silently dropped — returns "Session-only" and never writes scheduled_tasks.json
Summary
The CronCreate tool accepts a durable: true parameter but does not honor it. Every call — regardless of the flag — returns the session-only branch and no .claude/scheduled_tasks.json is written. Scheduled tasks die when the session ends.
Environment
- Claude Code CLI
- Model:
claude-opus-4-7 - macOS Darwin 21.6.0
- Observed: 2026-04-18
Expected
Per the tool schema:
durable: true = persist to .claude/scheduled_tasks.json and survive restarts. false (default) = in-memory only, dies when this Claude session ends.
Calling CronCreate with durable: true should:
- Write the job to
.claude/scheduled_tasks.json - Return a success message that does not say "Session-only"
- Survive
Claude exit → relaunch
Actual
Reproducer:
CronCreate(
cron="7 3 31 12 *",
prompt="DURABLE_FLAG_TEST — safe to delete",
durable=true,
recurring=false
)
Returns:
Scheduled one-shot task 875bb1c1 (7 3 31 12 *).
Session-only (not written to disk, dies when Claude exits).
It will fire once then auto-delete.
After the call:
$ ls .claude/scheduled_tasks.json
ls: scheduled_tasks.json: No such file or directory
Only the stale lock file exists:
$ cat .claude/scheduled_tasks.lock
{"sessionId":"ebbe5346-69fc-448c-825c-171144f58c15","pid":670,"acquiredAt":1776386918582}
Impact
Users following the "always-on EA agent" pattern (persistent tmux + scheduled automations) cannot rely on CronCreate for anything surviving session restart. Seven automations registered with durable: true the day prior (2026-04-17) were silently session-only and stopped firing overnight.
Workaround
Bypass CronCreate entirely — use macOS crontab + a dispatcher script that tmux send-keys the prompt into a long-lived Claude REPL session. Works but requires infrastructure the durable flag should have provided natively.
Additional notes
- The
CronListtool also returns no record of durable jobs, even in the session that created them. - If the durable path is gated on some setting (e.g.
enableDurableScheduling), that gate is undocumented in the tool schema — the schema says the flag alone controls behavior. - Request: either fix durable persistence, or update the tool schema to make clear the flag is a no-op in the current build.
7 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
If
durable: trueis accepted but the tool still silently takes the session-only path, then the product is violating one of the most important promises an automation surface can make: persistence semantics.This is worse than a simple missing feature because the interface appears to support durability already. The user is not asking for an unsupported mode, they are explicitly selecting it, and the system accepts the request while behaving as if the flag were false.
That creates a dangerous mismatch between declared intent and actual persistence:
In other words, it is a silent durability downgrade.
At minimum, if the durable path is unavailable or failing, the tool should reject the request clearly instead of returning a success-shaped session-only result. Accepting
durable: trueand then quietly discarding the persistence guarantee undermines trust in the tool contract itself.This is the same broader pattern we keep seeing in Claude Code issues lately: hidden control-plane behavior that diverges from the visible surface. If a flag changes semantics, the runtime has to honor it or fail loudly.
Confirming this on macOS Darwin 25.3.0, Claude Code 2.1.114 (CLI) and 2.1.111 (desktop Cowork) — same exact symptom as OP.
State after ~14h of Cowork session + recent CronCreate calls:
Lock is written, data file never is.
CronListfrom a freshly-restarted CLI session returnsNo scheduled jobs— confirming nothing was rehydrated.Downstream impact worth flagging: users building autonomous agent systems (scheduled briefings, inbox processors, etc.) silently lose all their crons on any restart. I've had to build an external launchd-based detector to alert when expected fires don't happen — purely because there's no trustworthy signal from Claude Code itself that a cron was dropped.
Happy to provide full repro / logs if useful.
Confirming this still reproduces on Linux (Ubuntu/WSL2) Claude Code 2.1.133, 2026-05-08. Same symptom set:
CronCreate(durable: true, ...)→ response still hard-codes "Session-only (not written to disk, dies when Claude exits)"~/.claude/scheduled_tasks.jsonnever created (onlyscheduled_tasks.lockleft over)CronListoutput explicitly tags the job[session-only]— so the metadata layer also treatsdurable=trueas ignored, not just the response wordingImpact in my workflow: had to dual-route a one-shot verification cron via OS
crontab+ a relay script as a backup, because there's no way to trust adurable: trueClaude cron will survive/clear, auto-compact subprocess restarts, or laptop suspend.Workaround for anyone hitting this: drop down to the OS scheduler (
crontab -e) and have the script self-delete its own crontab line on completion. Slightly more setup, but actually persistent.+1 — still repros on Claude Code 2.1.145 (macOS Darwin 25.4.0).
CronCreatewithdurable: truereturns the success message "Session-only (not written to disk, dies when Claude exits)" and~/.claude/scheduled_tasks.jsonis never created (only the.lockfile exists).Confirming this is still reproducing on macOS 26.4.1 as of 2026-05-23 — bumping for visibility.
Claude Code REPL launched from Claude Desktop,
CLAUDE_AGENT_SDK_VERSION=0.3.149. CalledCronCreate(cron="<expr>", recurring=true, durable=true, prompt="<...>"). The response confirmed the schedule but tagged the result as:~/.claude/scheduled_tasks.jsondoes not exist. The downgrade is silent —durable: trueis accepted by the schema but ignored by the implementation.Adding that this is still broken on Claude 1.12603.1 (3df4fd) 2026-06-11T16:57:36.000Z