[BUG] .worktreeinclude skips symlinked files
Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 0 comments · opened Oct 5, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When creating a worktree with claude -w <name>, entries from .worktreeinclude which happen to be symlinks are not copied to the new worktree. Usually this breaks the build in the new worktree.
What Should Happen?
All entries from .worktreeinclude should be copied, symlinks should be preserved.
At the very least, the current behavior should be documented.
Error Messages/Logs
Steps to Reproduce
.gitignore:
.mvn/maven.config
.worktreeinclude:
.mvn/maven.config
In the main checkout:
$ ls -al .mvn
total 8
drwxr-xr-x@ 5 hho staff 160 Oct 5 14:24 .
drwxrwxr-x@ 31 hho staff 992 Oct 5 15:18 ..
-rw-r--r--@ 1 hho staff 86 Nov 20 2025 jvm.config
lrwxr-xr-x@ 1 hho staff 43 Oct 5 14:24 maven.config -> /Volumes/projects/foo/bar/.mvn/maven.config
drwxr-xr-x@ 3 hho staff 96 Sep 24 17:38 wrapper
After claude -w foo:
$ ls -al .claude/worktrees/foo/.mvn
total 8
drwxr-xr-x@ 4 hho staff 128 Oct 6 00:20 .
drwxr-xr-x@ 28 hho staff 896 Oct 6 00:20 ..
-rw-r--r--@ 1 hho staff 86 Oct 6 00:20 jvm.config
drwxr-xr-x@ 3 hho staff 96 Oct 6 00:20 wrapper
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.289 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
This is the same bug as #68026 which was closed and locked without any solution
(last comment told me to open a new issue instead, which became this).