worktrees
The tracked changes tagged worktrees, newest release first. Every sentence is an item's summary.
Goes with
Changes
Claude Code v2.1.323
-
Changed the macOS and Linux sandbox so git worktree add, move, and remove fail read-only, as do commits in worktrees the session was not started in or given.
-
Changed worktree creation to refuse checkouts whose .git folders are links or hold hard links; use a plain clone.
-
Fixed ExitWorktree, the worktree exit dialog, and /resume leaving the session in the wrong folder when the folder the shell was in before entering the worktree had been deleted.
-
Fixed subagent transcripts and large tool results being saved apart from the session transcript after entering a worktree created by a WorktreeCreate hook or belonging to a nested repository.
-
Fixed a permission prompt appearing when Claude read output from its own background command or agent after entering a worktree.
+1 more
-
Fixed the tip after slow worktree creation suggesting a sparsePaths list without .claude, which left worktrees without project settings and rules.
Claude Code v2.1.321
-
The agent view row for a claude --bg --worktree session that failed to set up its worktree now shows the error from its beginning.
Claude Code v2.1.314
-
Fixed sandbox protections not applying to a worktree entered through claude -p --resume or --continue.
Claude Code v2.1.311
-
Fixed a subagent's isolated worktree being removed while a background subagent it started was still working in it.
Claude Code v2.1.309
-
Worktree-isolated sessions no longer accept some locale-prefixed commands that the isolation guard should refuse.
-
Worktree-isolated sessions on zsh no longer accept some arithmetic commands that the isolation guard should refuse.
-
Worktrees and branch checkouts created by Claude Code now ignore git replace refs, matching its other git operations.
-
Worktree creation and reuse no longer let git fetch objects on demand, in ordinary clones and in partial clones with a Bash sandbox configured; partial clones fetch them first.
Claude Code v2.1.305
-
Fixed new worktrees in a bare repository sometimes starting from local HEAD instead of the default branch.
-
Fixed unchanged subagent worktrees sometimes not being cleaned up.
Claude Code v2.1.302
-
Fixed worktree isolation refusing to create or resume worktrees under git 2.56 or later when a stray .git file points at a directory that does not exist.
Claude Code v2.1.301
-
Quitting no longer removes a worktree created by a WorktreeCreate hook without asking when it may hold unpushed commits.
Claude Code v2.1.299
-
Fixed worktree-isolated sessions accepting some awk programs the isolation guard should refuse.
-
Fixed --worktree sessions leaving a folder in .git/worktrees in repositories using git's reftable ref storage.
-
Improved the error for a worktree whose base commit does not resolve, explaining how the lookup ended and likely reasons.
-
Improved the error for creating a worktree at a bare-repository layout root to explain the layout.
-
Changed the resume command printed at exit of a worktree session to use -w and -r when long flags do not fit the terminal.
Claude Code v2.1.290
-
Fixed background subagents losing write and Bash access after the main session changed worktrees.
Claude Code v2.1.286
-
Fixed subagents spawned with worktree isolation loading the project CLAUDE.md and its imports a second time from the worktree copy on their first file read.
-
/exit's Remove worktree now runs after Claude Code stops the servers and shells it started there, which on Windows could keep the folder from being deleted.
Claude Code v2.1.285
-
Fixed SSH passphrase and new-host prompts from worktree and /teleport fetches taking over the terminal; these fetches now fail fast.
Claude Code v2.1.283
-
Fixed worktree checkouts failing certificate verification when the CA certificate is passed via GIT_CONFIG_COUNT environment pairs.