Claude Code v2.1.336 ·
Worktree creation handles existing branches and reports more failures
Creating a worktree now chooses how to set up its branch, can run an extra step, and reports two new errors
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.336,
ImprovementsSection of the release
Unclear What the extra setup step after creating the worktree does, and when it is available, is not shown.
What
A worktree is a separate working copy of a git repository, so Claude can work without touching your main folder. When Claude Code creates one:
- It now picks between git's
-B and -b options depending on whether the branch already points at the starting point.
- It runs an extra setup step after
git worktree add when one is available.
- New error messages cover a branch that already exists, and a folder on the way to the worktree that was replaced while it was being made.
Why
This changes how worktrees are created and gives clearer messages when creation fails.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhat the extra setup step after creating the worktree does, and when it is available, is not shown.
See this entry in the whole of v2.1.336 →