All areas Feed Weekly digests

worktree

The tracked changes tagged worktree, newest release first. Every sentence is an item's summary.

26 items from 8 releases, 6 breaking Sources: Claude Code Last change:

Goes with

Changes

Claude Code v2.1.332

  1. fix

    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

  1. fix

    Fixed ExitWorktree and the worktree exit dialog deleting a worktree that another running session was using.

Claude Code v2.1.327

  1. fix

    Fixed stopping the Remote Control server in worktree mode deleting a running session's git-ignored files such as .env.

  2. fix

    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.

  3. feature

    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

  1. breaking Breaking

    Worktree creation, /teleport and IDE checkouts run git with a stricter PATH, so a git filter or helper may need its full path.

  2. breaking Breaking

    Subagents isolated in a worktree refuse some git commands in Bash that can rewrite branches shared with the checkout, in any repository.

  3. breaking Breaking

    ExitWorktree refuses removing a worktree while a background subagent or shell command may still run in it, unless discard_changes is passed.

  4. fix

    claude --worktree shows progress while a slow worktree is set up.

  5. fix

    The worktree exit dialog no longer counts a new folder as one uncommitted file.

+1 more
  1. other

    Some worktree sessions skip some plugin settings, and a notice names what was skipped.

Claude Code v2.1.325

  1. breaking Breaking

    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.

  2. breaking Breaking

    Changed EnterWorktree to refuse a WorktreeCreate hook path that goes through a symlink inside the project; the hook should print the real path.

  3. breaking Breaking

    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.

  4. fix

    Fixed --worktree skipping a WorktreeCreate hook from a plugin in CLAUDE_CODE_PLUGIN_SEED_DIR on the first run in a new home directory.

  5. fix

    Fixed worktree.sparsePaths and sparse plugin and marketplace clones omitting the repository root files on older git versions such as 2.34.

+3 more
  1. fix

    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.

  2. fix

    Fixed a case where the Bash sandbox did not fully protect a worktree's settings and hooks.

  3. fix

    Fixed a case where the Bash sandbox did not fully protect a linked worktree's shared git folder.

Claude Code v2.1.319

  1. fix

    Fixed a sandbox escape when creating a worktree.

Claude Code v2.1.304

  1. fix

    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

  1. fix

    Plugin WorktreeCreate and WorktreeRemove hooks now run when Claude Code starts with --worktree (not yet with --tmux).

  2. fix

    --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.

  3. fix

    The branch no longer shows as .invalid, and --worktree can reopen a worktree, in repositories using reftable ref storage.

  4. fix

    --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.

  5. fix

    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.