Claude Code 2.1.304 Fixes Worktree Bug That Could Delete Branches on Exit

Claude Code's --worktree option normally asks before removing a worktree that contains work, but a bug could remove it and its branch without prompting. The release note says this happened when HEAD was detached or pointed at a branch other than the one Claude created, which could lose commits. Version 2.1.304, published by Anthropic on October 19, fixes the problem. The article's author notes the affected versions and root cause were not specified, and they did not reproduce the bug. Users who used --worktree are advised to update and check for recently lost commits using git fsck, then save any found commits to a branch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in