[BUG]CronCreate `durable=true` parameter not honored — recurring cron not persisted to .claude/scheduled_tasks.json despite documented behavior

Resolved 💬 3 comments Opened May 1, 2026 by rickyibarz-jj Closed May 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

/tmp/upstream-report-claude-code-cron-durable-ignored-draft-v1.1.md

What Should Happen?

When CronCreate is called with durable=true, the cron job should be persisted to .claude/scheduled_tasks.json and survive --continue restarts, per the documented behavior in the CronCreate tool docstring:

> durable: true = persist to .claude/scheduled_tasks.json and survive restarts. false (default) = in-memory only, dies when this Claude session ends.

Instead, the harness response on durable=true calls returns "Session-only (not written to disk, dies when Claude exits)" and disk inspection confirms .claude/scheduled_tasks.json is not written. The durable=true parameter appears silently ignored.

A separate opposite-direction unreliability has also been observed: durable=false crons sometimes persist across multiple --continue restarts (n=6-of-8 incidents over 9 days). Both directions of CronCreate durability behavior appear unreliable; neither matches the documented contract.

Error Messages/Logs

Actual harness response observed (verbatim from a real session, 2026-05-01 ~00:12Z) when CronCreate was called with durable=True:

Scheduled recurring job 68e605fb (Every 4 hours at :13). Session-only (not written to disk, dies when Claude exits). Auto-expires after 7 days. Use CronDelete to cancel sooner.

Disk inspection of .claude/ directory post-create:

drwx------   5 user  staff   160 May  1 00:12 .
drwx------  22 user  staff   704 May  1 00:14 ..
-rw-------   1 user  staff   130 May  1 00:12 scheduled_tasks.lock
-rw-------   1 user  staff  1619 Apr 21 20:25 settings.json
drwx------  54 user  staff  1728 Apr 21 20:25 skills

.claude/scheduled_tasks.json does NOT exist. Only scheduled_tasks.lock is present (a 130-byte process-lock file containing sessionId + pid + procStart + acquiredAt — not the cron data).

Post --continue restart, CronList returns:
"No scheduled jobs"

Steps to Reproduce

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

CronCreate(
    cron="13 */4 * * *",
    prompt="<any prompt>",
    durable=True,
    recurring=True
)

2. Observe the harness response — it will say "Session-only (not written to disk, dies when Claude exits)" despite the durable=true parameter being passed.

3. Verify by disk inspection:

ls -la /path/to/your/.claude/

Note that .claude/scheduled_tasks.json does NOT exist post-create. Only .claude/scheduled_tasks.lock is present (a process lock, not cron data).

4. Restart with --continue. After resume, run CronList — it returns "No scheduled jobs". The cron is gone, as predicted by the "session-only" response, despite durable=true having been passed at create time.

EXPECTED: Per docstring, durable=true should persist the cron to .claude/scheduled_tasks.json and survive restarts.
ACTUAL: Cron is in-memory only and dies on session exit (matches durable=false behavior).

Tested in real session 2026-05-01 ~00:12Z. Reproducible on demand

### Claude Model

None

### Is this a regression?

No, this never worked

### Last Working Version

_No response_

### Claude Code Version

2.1.123 (Claude Code)

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗