Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.327 ·

Removing a worktree and discarding its changes now always asks

Removing a worktree with discard_changes now goes through a permission prompt and can no longer be approved once for good

Group of 2 You'll notice Improvements
JSON All of v2.1.327
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
WorktreesArea: what it touches
ImprovementsKind: in v2.1.327,
ImprovementsSection of the release

What

A worktree is a separate working copy of your project that a session can work in. The ExitWorktree tool can remove it, and with discard_changes it throws away any work in it. That case is now handled more strictly:

  • The removal now goes through the permission step and asks you, instead of being checked earlier and refused there.
  • If the session has already left the worktree, the call is denied with the message The session left its worktree before this call ran.
  • Auto mode's safety check now sees the action described as remove the worktree and discard any work in it, not only the bare action name.
  • An always-allow rule, which would approve the action without asking again, can no longer be used for this case.

Why

Deleting a worktree together with its unsaved work cannot be undone, so it now asks each time and cannot be pre-approved permanently.

Read from
Names in the bundlediscard_changes
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up discard_changes, on Hooks reference. When `claude remote-control` cleans up a worktree, expect your hook to run without a prompt. If you ask Claude to remove a hook-created worktree, expect `ExitWorktree` to refuse unless Claude passes [`discard_changes: true`](https://code.c… hooks see the edit
Added since A small documentation edit on Hooks reference touched a line naming discard_changes after this was published. For a `claude remote-control` cleanup, Claude Code runs your hook without prompting you. `ExitWorktree` refuses to remove a hook-created worktree unless the call passes [`discard_changes: true`](https://code.claude.com/docs/en/agent-sdk/ty… hooks see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesA small documentation edit on Hooks reference touched a line naming discard_changes after this was published.

See this entry in the whole of v2.1.327 →

Feedback