Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.271 ·

git worktree list parsing gets duplicate-path and NUL-separated output handling

Parsing of git worktree list --porcelain output is now checked for duplicate paths and can use NUL-separated output for safety

Group of 3 Under the hood Internal Changes
JSON All of v2.1.271
Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
WorktreesArea: what it touches
Internal ChangesKind: in v2.1.271,
Internal ChangesSection of the release

What

Parsing of git worktree list --porcelain output was made more robust in two ways:

  • A new validation check looks for duplicate worktree paths in the parsed listing, normalizing paths to NFC on macOS first, and is run as a standalone check before the usual branch-matching scan; if it finds duplicates or an inconsistent listing, the scan is skipped and treated as unreliable.
  • Worktree listing now probes whether the installed git supports NUL-separated output and, when it does, passes -z to git worktree list --porcelain and splits entries on the null character instead of newlines, avoiding ambiguity when a worktree path itself contains a newline.

Why

Both changes prevent Claude Code from misreading the worktree list when paths are duplicated, unicode-normalized differently, or contain unusual characters like newlines, which could otherwise cause it to match the wrong worktree.

See this entry in the whole of v2.1.271 →

Feedback