A user reported that Claude Code's automatic worktree cleanup feature silently deleted approximately 10 days of uncommitted work, resulting in the loss of over 300 files. The user assumed their work would be preserved until explicitly committed, but each new session initiated a cleanup that removed the previous worktree without any prompt, commit, or stash. This issue appears to be corroborated by at least three other users who experienced similar data loss across different versions of Claude Code and operating systems. Despite user proposals for safeguards like auto-committing to a recovery branch or prompting before deletion, the issue was closed as "not planned" without maintainer response. AI
IMPACT Highlights the critical need for clear contracts on data handling and recovery for agentic tools managing user workspaces.
RANK_REASON User-reported bug in a specific tool's functionality with corroborating reports.
Read on dev.to — Claude Code tag →
- Claude Code
- Claude Code 2.1.140
- Claude Max 20
- GitHub
- Git worktrees
- macOS
- Next.js 16
- software as a service
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →