claude-code - 💡(How to fix) Fix CronCreate with durable=true still reports and behaves as session-only [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51671Fetched 2026-04-22 07:56:00
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×3labeled ×3closed ×1mentioned ×1

CronCreate accepts durable: true without error, but the resulting job is session-only — it is not written to disk and dies when Claude Code exits. The tool's own schema describes durable mode as writing to .claude/scheduled_tasks.json and surviving restarts; the observed behavior contradicts that.

Error Message

CronCreate accepts durable: true without error, but the resulting job is session-only — it is not written to disk and dies when Claude Code exits. The tool's own schema describes durable mode as writing to .claude/scheduled_tasks.json and surviving restarts; the observed behavior contradicts that.

Root Cause

CronCreate accepts durable: true without error, but the resulting job is session-only — it is not written to disk and dies when Claude Code exits. The tool's own schema describes durable mode as writing to .claude/scheduled_tasks.json and surviving restarts; the observed behavior contradicts that.

Code Example

CronCreate({
  cron: "7 9 12 5 *",
  recurring: false,
  durable: true,
  prompt: "..."
})
RAW_BUFFERClick to expand / collapse

Summary

CronCreate accepts durable: true without error, but the resulting job is session-only — it is not written to disk and dies when Claude Code exits. The tool's own schema describes durable mode as writing to .claude/scheduled_tasks.json and surviving restarts; the observed behavior contradicts that.

Repro

CronCreate({
  cron: "7 9 12 5 *",
  recurring: false,
  durable: true,
  prompt: "..."
})

Expected

Per the tool description: "durable: true = persist to .claude/scheduled_tasks.json and survive restarts."

Actual

  1. Tool response message: Scheduled one-shot task 6e43fbac (7 9 12 5 *). Session-only (not written to disk, dies when Claude exits). It will fire once then auto-delete.
  2. CronList reports the job as [session-only].
  3. No ~/.claude/scheduled_tasks.json file is created (only a scheduled_tasks.lock is present).

Impact

Users following the documented behavior to set long-horizon reminders get silent no-ops at session exit. No warning, no schema-level rejection — just the task disappearing.

Suggested fix

Either implement durable persistence as described, or reject durable: true at schema validation until implemented (preferred: fail loud rather than silently downgrade).

Environment

  • Claude Code CLI on Darwin 25.3.0 (macOS)
  • Model: claude-opus-4-7 (1M context)
  • Date observed: 2026-04-21

extent analysis

TL;DR

The CronCreate function with durable: true should either be modified to correctly write to .claude/scheduled_tasks.json or reject the durable: true parameter at schema validation to prevent silent failures.

Guidance

  • Verify the current implementation of CronCreate to understand why it's not writing to .claude/scheduled_tasks.json despite durable: true being set.
  • Check the schema validation for CronCreate to see if it correctly handles the durable parameter and if it can be modified to reject durable: true until the persistence issue is fixed.
  • Investigate the purpose of the scheduled_tasks.lock file and its relation to the expected scheduled_tasks.json file.
  • Consider adding a warning or error message when durable: true is set but the task cannot be persisted to disk.

Example

No code snippet can be provided without more context about the implementation of CronCreate and the schema validation.

Notes

The suggested fix implies that there might be an issue with the implementation of the durable mode in CronCreate, and without more information about the code, it's difficult to provide a precise solution. The environment details suggest that this issue is specific to the Claude Code CLI on macOS, but it's unclear if this is a platform-specific problem.

Recommendation

Apply a workaround by rejecting durable: true at schema validation until the persistence issue is fixed, as this will prevent silent failures and provide a clear error message to users.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix CronCreate with durable=true still reports and behaves as session-only [3 comments, 3 participants]