claude rm <id> gains a --discard-unpushed <commit>@<worktree-id> option to delete a background session's worktree even when it has unpushed commits or uncommitted changes, provided the worktree is still at the commit last reported. When claude rm refuses to delete a worktree with unpushed work, it now reports the exact <commit>@<worktree-id> value to pass to this new flag.
Names in the bundleclaude rm
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.
Added since
A small documentation edit on Manage sessions touched a line naming claude rm after this was published.
Transcripts age out under the [retention sweep rules](/docs/en/claude-directory#cleaned-up-automatically). To delete a project's transcripts and related state sooner, run [`claude purge`](/docs/en/claude-directory#clear-local-data). If you…sessions see the edit
Confirmed since
Anthropic's documentation has since written up claude rm, on Manage multiple agents with agent view.
* Delete the session again to remove the directory anyway, by pressing `Ctrl+X` twice on its row in agent view or running the `claude rm <id> --force-remove-worktree <worktree-id>` command that the `claude rm` refusal printed. Claude Code …agent-view see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up claude rm, on Manage multiple agents with agent view.