Best practices for Claude Code changedbest-practices
Nearest release: v2.1.332, published 2 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 25 Nov 2026 00:35 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 25 Nov 2026 00:37 UTC.
Upstream edited
Recorded here
Lines+1added
Lines−2removed
From line
592
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits39to this page, all time
The whole hunk
from line 592, old and new numbered
/
from line 592
592592You rarely have to clean any of this up yourself:
593593
594594* When you exit an unnamed worktree session, Claude Code [removes a worktree it created with git](https://code.claude.com/docs/en/worktrees.md#clean-up-worktrees) if there's nothing in it. For a named session, or one with changes, it asks what to do.
595* Subagent worktrees disappear when the subagent finishes without changes.
596* Subagent and background-session worktrees that do get left behind are swept once they're older than `cleanupPeriodDays` and hold no work.
595* Subagent and background-session worktrees that get left behind [can be removed automatically](https://code.claude.com/docs/en/worktrees.md#clean-up-subagent-and-background-session-worktrees) once they're older than `cleanupPeriodDays` and hold no work.
597596
598597> [!NOTE]
599598>
No line in this hunk matches that.