Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.72 Home All releases olderv2.1.71 v2.1.73newer
Claude Code v2.1.72

ExitWorktree Tool

What

A new tool that allows exiting a worktree session mid-conversation without ending the session, returning to the original working directory.

Details
  • Accepts action: "keep" to preserve the worktree and branch on disk, or action: "remove" to delete both
  • When removing a worktree with uncommitted changes, requires explicit discard_changes: true confirmation
  • Checks for uncommitted files and unmerged commits before removal
  • Only operates on worktrees created by EnterWorktree in the current session
  • The EnterWorktree tool message now references ExitWorktree: "Use ExitWorktree to leave mid-session, or exit the session to be prompted"
Evidence

New tool definition (search for "ExitWorktree")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.72 →