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.299,
ImprovementsSection of the release
What
A worktree is an extra working copy of a git repository that Claude Code can create so it can work separately from your main checkout, for example with --worktree. If you start that from a folder whose .git points to a bare repository (one with no working files of its own), Claude Code now stops straight away. It explains that it cannot create a worktree from this folder and tells you to start Claude Code in one of that repository's worktrees. Before, the attempt failed later with an error from git.
Why
If you keep repositories in a bare layout, you now get a message that says what to do instead of a git error.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up --worktree, on Desktop application.| Session isolation | [`--worktree`](/docs/en/cli-reference) flag | [Run a session in its own worktree](#run-a-session-in-its-own-worktree) |desktopsee the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up --worktree, on Desktop application.
Anthropic's release notes agreeFixed --worktree sessions leaving a folder behind in .git/worktrees in repositories using git's reftable ref storage