worktree
The tracked changes tagged worktree, newest release first. Every sentence is an item's summary.
Goes with
Changes
Claude Code v2.1.332
-
Fixed CLAUDE.md and rules files being sent to the model a second time in most cases after a session moves into or resumes in a worktree under .claude/worktrees.
Claude Code v2.1.330
-
Fixed ExitWorktree and the worktree exit dialog deleting a worktree that another running session was using.
Claude Code v2.1.327
-
Fixed stopping the Remote Control server in worktree mode deleting a running session's git-ignored files such as .env.
-
Fixed claude agents and claude rm refusing to remove a fully pushed session when its worktree has a top-level file or folder named HEAD.
-
Changed ExitWorktree to ask before removing a worktree that may hold unsaved work; it is refused in don't-ask mode or with nobody to answer unless an allow rule, auto or bypass mode allows it.
Claude Code v2.1.326
-
Worktree creation, /teleport and IDE checkouts run git with a stricter PATH, so a git filter or helper may need its full path.
-
Subagents isolated in a worktree refuse some git commands in Bash that can rewrite branches shared with the checkout, in any repository.
-
ExitWorktree refuses removing a worktree while a background subagent or shell command may still run in it, unless discard_changes is passed.
-
claude --worktree shows progress while a slow worktree is set up.
-
The worktree exit dialog no longer counts a new folder as one uncommitted file.
Claude Code v2.1.325
-
Changed worktree isolation so an isolated worktree session or agent is refused git bisect run, git maintenance register or start, and scalar set-up commands, and is told what still works.
-
Changed EnterWorktree to refuse a WorktreeCreate hook path that goes through a symlink inside the project; the hook should print the real path.
-
Changed -p and SDK runs in a worktree or submodule mounted into a container to apply .claude/settings.local.json allow rules only once the folder is trusted.
-
Fixed --worktree skipping a WorktreeCreate hook from a plugin in CLAUDE_CODE_PLUGIN_SEED_DIR on the first run in a new home directory.
-
Fixed worktree.sparsePaths and sparse plugin and marketplace clones omitting the repository root files on older git versions such as 2.34.
+3 more
-
Fixed Code Mode scripts ignoring a worktree entered with EnterWorktree, writing ~ paths into the project, and leaving /mcp showing a server connected after its sign-in expired.
-
Fixed a case where the Bash sandbox did not fully protect a worktree's settings and hooks.
-
Fixed a case where the Bash sandbox did not fully protect a linked worktree's shared git folder.
Claude Code v2.1.319
-
Fixed a sandbox escape when creating a worktree.
Claude Code v2.1.304
-
Fixed claude --worktree removing the worktree and its branch without asking at exit when HEAD was detached or on another branch, which could lose commits.
Claude Code v2.1.300
-
Plugin WorktreeCreate and WorktreeRemove hooks now run when Claude Code starts with --worktree (not yet with --tmux).
-
--worktree sessions now start from the correct commit when a tag or branch is named like a commit ID, and their starting git status names the new worktree's branch.
-
The branch no longer shows as .invalid, and --worktree can reopen a worktree, in repositories using reftable ref storage.
-
--worktree in a worktree of a bare repository no longer fails when origin's default branch cannot be fetched; the fallback base is now the current checkout's HEAD.
-
In VS Code, Resume session and tabs restored after a reload now open the conversation that moved into a git worktree instead of an empty new conversation.