All areas Feed Weekly digests

worktrees

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

27 items from 13 releases, 2 breaking Sources: Claude Code Last change:

Goes with

Changes

Claude Code v2.1.323

  1. breaking Breaking

    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.

  2. breaking Breaking

    Changed worktree creation to refuse checkouts whose .git folders are links or hold hard links; use a plain clone.

  3. fix

    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.

  4. fix

    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.

  5. fix

    Fixed a permission prompt appearing when Claude read output from its own background command or agent after entering a worktree.

+1 more
  1. fix

    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

  1. other

    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

  1. fix

    Fixed sandbox protections not applying to a worktree entered through claude -p --resume or --continue.

Claude Code v2.1.311

  1. fix

    Fixed a subagent's isolated worktree being removed while a background subagent it started was still working in it.

Claude Code v2.1.309

  1. fix

    Worktree-isolated sessions no longer accept some locale-prefixed commands that the isolation guard should refuse.

  2. fix

    Worktree-isolated sessions on zsh no longer accept some arithmetic commands that the isolation guard should refuse.

  3. fix

    Worktrees and branch checkouts created by Claude Code now ignore git replace refs, matching its other git operations.

  4. other

    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

  1. fix

    Fixed new worktrees in a bare repository sometimes starting from local HEAD instead of the default branch.

  2. fix

    Fixed unchanged subagent worktrees sometimes not being cleaned up.

Claude Code v2.1.302

  1. fix

    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

  1. fix

    Quitting no longer removes a worktree created by a WorktreeCreate hook without asking when it may hold unpushed commits.

Claude Code v2.1.299

  1. fix

    Fixed worktree-isolated sessions accepting some awk programs the isolation guard should refuse.

  2. fix

    Fixed --worktree sessions leaving a folder in .git/worktrees in repositories using git's reftable ref storage.

  3. other

    Improved the error for a worktree whose base commit does not resolve, explaining how the lookup ended and likely reasons.

  4. other

    Improved the error for creating a worktree at a bare-repository layout root to explain the layout.

  5. other

    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

  1. fix

    Fixed background subagents losing write and Bash access after the main session changed worktrees.

Claude Code v2.1.286

  1. fix

    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.

  2. fix

    /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

  1. fix

    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

  1. fix

    Fixed worktree checkouts failing certificate verification when the CA certificate is passed via GIT_CONFIG_COUNT environment pairs.