Run parallel sessions with worktrees changedworktrees
Nearest release: v2.1.312, 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 27 Oct 2026 20:51 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 27 Oct 2026 21:07 UTC.
Upstream edited
Recorded here
Lines+6added
Lines−0removed
From line
324
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits40to this page, all time
### A worktree Claude Code created has the original content of replaced objects
The whole hunk
from line 324, old and new numbered
/
from line 324
324324
325325Claude Code refuses to create a worktree when `.claude`, `.claude/worktrees`, or the worktree directory itself is a symlink, and the error names the symlinked path. Remove the symlink and retry. Before v2.1.212, if the repository already contained a committed symlink at one of those paths, worktree creation followed it and could create files outside the repository.
326326
327### A worktree Claude Code created has the original content of replaced objects
328
329If your repository uses [`git replace`](https://git-scm.com/docs/git-replace), the files in a worktree that Claude Code creates hold the original objects' content rather than the replacements your `refs/replace/` entries name. Claude Code runs the git commands that check out the worktree's files with `GIT_NO_REPLACE_OBJECTS=1`, ignoring any value you exported for that variable.
330
331To get the replaced content, [create the worktree yourself](#manage-worktrees-manually) with `git worktree add` and start Claude Code inside it.
332
327333### Git LFS files are pointer files in a worktree Claude Code created
328334
329335If you set up [Git LFS](https://git-lfs.com) with `git lfs install --local`, a worktree that Claude Code creates contains LFS pointer files instead of the real files. The `--local` flag writes the LFS filter into the repository's own `.git/config` rather than your global git config. A plain `git lfs install` writes to your global config and isn't affected. The same applies to any other [filter driver](https://git-scm.com/docs/gitattributes) defined in the repository's own config.
No line in this hunk matches that.