Group of 2 You'll notice
Scheduled and cron tasks are now filtered more strictly so tasks copied from another checkout or project don't run here
What
Claude Code now applies extra checks before treating a pending scheduled or cron task as belonging to the current session:
- A new async helper collects the creator session IDs referenced by pending tasks (other than the current session) and checks whether a transcript file exists on disk for each; tasks whose creator has no transcript are excluded from the set this session will run, with a log line flagging that a
scheduled_tasks.jsoncopied from another checkout looks like this. - Tasks now also carry a
createdInProjectfield, matched against the current project's normalized path, in addition to the existingcreatedBySessionId/pid-based ownership check, before a task is treated as belonging here for missed-task and firing logic.
Why
Without these checks, a scheduled_tasks.json file copied between checkouts or projects could cause tasks meant for a different session or project to run in the wrong place; these changes catch that case.