[BUG] Durable CronCreate jobs are project-cwd-scoped and fire into unrelated sessions sharing that directory; tool defaults to durable without confirming scope

Open 💬 0 comments Opened Jun 9, 2026 by jimmycgz

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?

A durable cron created via CronCreate (or /loop) in one session fires its prompt into a different, unrelated session — any session whose working directory is the same project — instead of only the session that created it. Combined with the tool defaulting to durable without confirming scope, this produces recurring, unwanted interruptions in the wrong conversation that the affected session cannot easily stop.

Two distinct problems:

  1. Scoping is by project working directory, not by session. Durable crons persist to <project>/.claude/scheduled_tasks.json and fire in whichever session for that project is idle when they trigger. If two sessions share a working directory, a cron created in session A fires into session B.
  2. Default/UX. The job was made durable without the creating session confirming scope with the user. From the user's point of view they asked for "a timed task," and got cross-session interruptions they never requested. Per the tool's own guidance the default should be session-only unless persistence is explicitly requested — and when durable, the cross-session/project-scope consequence should be surfaced.

What Should Happen?

  • Default to session-only (durable: false) unless the user explicitly asks for persistence.
  • When durable: true, the agent should confirm/surface the scope — i.e. that a durable cron is bound to the project working directory and will fire in any session sharing that directory, not only the creating session.
  • Ideally, durable crons should record the originating session and either fire only there, or be clearly attributable/removable from any session in the project.

Error Messages/Logs

### Actual

- Durable cron silently bound to the project cwd; fires into unrelated sessions sharing that cwd; no scope confirmation at creation; hard to stop from the session being interrupted.

Steps to Reproduce

  1. Open session A with cwd ~/projects/foo. Create a recurring durable cron:

CronCreate({ cron: "55 10-18 * * 1-4", prompt: "<task>", durable: true })

  1. Open session B, also with cwd ~/projects/foo (e.g. a second terminal / claude --resume of a different conversation started from the same directory).
  2. At the scheduled time, the cron prompt fires into session B (whichever is idle), not only session A.
  3. In session B, the user repeatedly asks to stop it, but it returns on the next fire — session B did not create it and (depending on state) CronList may not surface it as removable from that context.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.169 (Claude Code)

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Environment

  • Claude Code version: 2.1.169
  • Platform: macOS 26.3.1 (Apple Silicon / arm64)
  • Shell: zsh
  • Interface: Claude Code CLI

Notes / related

  • Confirmed the on-disk store in this case was <project>/.claude/scheduled_tasks.json (project-scoped), and CronDelete from a session in the same project did clear it ({"tasks": []} afterward).
  • Inconsistent with #59337, which reports durable: true is a silent no-op on macOS (nothing persisted). Here it did persist and leaked across sessions — so the durability/scoping behavior appears inconsistent and under-specified across environments.
  • Thematically adjacent: #46561 (stale crons keep firing after stop), #62036 (session-only crons miss idle fires), #49198 (deleted crons keep firing).

View original on GitHub ↗