[BUG] Desktop app materializes junctioned .claude/skills as real-dir copies in new-session worktrees (Windows)

Status Open
Reported on v2.1.195
Maintainer reply None cached
Activity 0 comments · opened Jul 24, 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?

On Windows, the Claude Code desktop app materializes a new session's git
worktree by copying the source checkout's git-ignored .claude/skills into the
new worktree as real directories, dereferencing the NTFS junctions of the
main checkout instead of preserving them.

My skills are wired as directory junctions (.claude/skills/<name> ->
...\agent-skills\skills\<name>). When the desktop app creates a new-session
worktree, each .claude/skills/<name> arrives as a real copied directory, not a
junction.

What Should Happen?

When creating a new-session worktree, the desktop app should preserve reparse
points (junctions/symlinks)
it finds under .claude/ instead of dereferencing
them into real-directory copies — or make this materialization step opt-in and
documented
(e.g. via .worktreeinclude, consistent with the documented
tracked-files-only behavior).

Error Messages/Logs

Steps to Reproduce

  1. On Windows, in a repo, wire a git-ignored .claude/skills/<name> as an NTFS

directory junction to an external folder
(New-Item -ItemType Junction -Path .claude\skills\foo -Target <external>).

  1. From the Claude Code desktop app, create a new session for that repo

(which creates a new git worktree).

  1. Inspect the new worktree's .claude/skills/<name>:

Get-Item .claude\skills\foo | Select LinkType,Target.
Expected: Junction -> <external>. Actual: LinkType is empty — it is a
real copied directory.

Note: a WorktreeCreate hook that fully replaces creation avoids the problem
(the app does not run its copy step; wiring then produces junctions from the
start), which confirms the copy is part of the app's default creation flow.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.195

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗