[BUG] Durable cron tasks written to ephemeral git worktree instead of main repo
Resolved 💬 3 comments Opened Apr 24, 2026 by fgm Closed May 29, 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?
Persisted scheduled tasks created when Claude is running in a non-main worktree are lost when working in other worktrees, or if the worktree is deleted.
What Should Happen?
Persisted scheduled tasks should be available in all worktrees for a given repo.
Error Messages/Logs
Steps to Reproduce
CronCreatewithdurable: truewritesscheduled_tasks.jsonto.claude/in the current working directory- When
CWDis agit worktree, the file is lost when theworktreeis cleaned up - Should write to the main worktree's
.claude/(discoverable viagit rev-parse --git-common-dir) or~/.claude/ - Reproducible: create worktree, start Claude, create durable cron, remove worktree, task is gone
Claude Model
None
Is this a regression?
Untested.
Last Working Version
None.
Claude Code Version
2.1.119 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗