claude-code - 💡(How to fix) Fix CronCreate: durable:true flag silently dropped, task runs as session-only [1 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#51803Fetched 2026-04-22 07:52:24
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

When invoking the CronCreate tool with durable: true, the flag is silently ignored. The tool returns the standard success response noting the task is "Session-only (not written to disk, dies when Claude exits)" — even though durable was explicitly requested. .claude/scheduled_tasks.json is never written.

Error Message

  • durable: true is accepted without warning or error
  1. Reject the flag explicitly with an error so callers aren't silently downgraded

Root Cause

When invoking the CronCreate tool with durable: true, the flag is silently ignored. The tool returns the standard success response noting the task is "Session-only (not written to disk, dies when Claude exits)" — even though durable was explicitly requested. .claude/scheduled_tasks.json is never written.

Fix Action

Fix / Workaround

Workaround currently in use

Bypassed via crontab + tmux send-keys dispatcher:

  • crontab -l entries invoke .claude/scripts/cron-dispatch.sh <automation-name>
  • Dispatcher uses tmux send-keys to push an invocation prompt into a persistent claude-agent pane
  • A launchd plist (com.sani.claude-channel) keeps the pane alive and relaunches Claude if the REPL exits
RAW_BUFFERClick to expand / collapse

Bug: CronCreate with durable: true silently dropped — task runs as session-only

Model: claude-opus-4-7 Observed: 2026-04-18, reproduced 2026-04-21 Severity: Medium — no errors, but durable cron is effectively unavailable (silent-fail)

Summary

When invoking the CronCreate tool with durable: true, the flag is silently ignored. The tool returns the standard success response noting the task is "Session-only (not written to disk, dies when Claude exits)" — even though durable was explicitly requested. .claude/scheduled_tasks.json is never written.

Expected behaviour

With durable: true, the scheduled task should persist across Claude Code sessions, be written to .claude/scheduled_tasks.json, and fire on schedule whether or not a REPL is active.

Actual behaviour

  • durable: true is accepted without warning or error
  • Tool response says "Session-only (not written to disk, dies when Claude exits)"
  • .claude/scheduled_tasks.json is not created
  • Task dies when the session ends

Reproduction

Invoke CronCreate with any valid schedule and durable: true. Compare the response text to what's documented for durable tasks. Check whether .claude/scheduled_tasks.json was written.

Workaround currently in use

Bypassed via crontab + tmux send-keys dispatcher:

  • crontab -l entries invoke .claude/scripts/cron-dispatch.sh <automation-name>
  • Dispatcher uses tmux send-keys to push an invocation prompt into a persistent claude-agent pane
  • A launchd plist (com.sani.claude-channel) keeps the pane alive and relaunches Claude if the REPL exits

This works, but it's a fair bit of plumbing for what durable: true should handle natively.

Suggested fix

Either:

  1. Honour durable: true by writing to .claude/scheduled_tasks.json and running a persistent scheduler, or
  2. Reject the flag explicitly with an error so callers aren't silently downgraded

Silent downgrade is the worst outcome — users who pass the flag believe they have durability until the first cross-session miss.

Environment

  • Claude Code CLI
  • macOS (Darwin 21.6.0)
  • Model: claude-opus-4-7

extent analysis

TL;DR

The CronCreate tool with durable: true is silently ignoring the flag, causing tasks to run as session-only, and a potential fix involves modifying the tool to either honor the durable: true flag or reject it with an error.

Guidance

  • Verify that the CronCreate tool is correctly parsing the durable: true flag and that it is not being overridden by any other configuration or environment variables.
  • Check the documentation and implementation of the CronCreate tool to see if there are any specific requirements or constraints for using the durable: true flag.
  • Consider implementing a workaround similar to the one currently in use, which involves using crontab and tmux send-keys to dispatch the task, until a native fix is available.
  • Test the CronCreate tool with different schedules and flags to see if the issue is specific to certain configurations or if it is a more general problem.

Example

No code snippet is provided as the issue does not include specific code examples, but the workaround currently in use involves creating a crontab entry that invokes a dispatcher script, which uses tmux send-keys to push an invocation prompt into a persistent claude-agent pane.

Notes

The issue seems to be specific to the claude-opus-4-7 model and macOS environment, and it is unclear if this is a more general problem or a specific bug in the CronCreate tool. Further investigation and testing are needed to determine the root cause and develop a comprehensive fix.

Recommendation

Apply workaround: The current workaround using crontab and tmux send-keys seems to be effective, and until a native fix is available, it may be the best option for ensuring durable cron tasks.

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: durable:true flag silently dropped, task runs as session-only [1 participants]