Skip to content

[Bug]: Windows multi-repository worktree setup fails when linking shared project folders #44420

Backlog

Description

@xbmulot-maker

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On native Windows, run T3 as a standard user with Developer Mode off.
  2. Open a project whose root is a plain folder containing multiple Git repositories and a shared directory such as .claude alongside them. Include a loose shared file such as AGENTS.md in the test fixture.
  3. Start a thread in New worktree mode.

Expected behavior

Provisioning completes without requiring elevated privileges or Developer Mode. The thread can access the shared project configuration at the expected paths.

Actual behavior

Provisioning fails during Check out files, before the agent starts. The server reports PermissionDenied: FileSystem.symlink (<project-root>\.claude). On the affected host, a separate native Windows check confirmed that creating a directory symlink without elevation failed while creating a directory junction succeeded.

TaskFolders.ts uses a symlink for shared entries outside the tracked repository roots. Git checkout itself does not need this operation.

Impact

Blocks new worktree threads for the affected project.

Version or commit

T3 desktop 0.1.12.

Proposed fix

Use junctions for shared directories on Windows when the target supports them. Keep symlinks for shared files and directories on macOS and Linux. Define the Windows behavior for loose files separately so provisioning can complete with Developer Mode off. A copy is a snapshot and changes live sharing semantics. A hard link cannot cross volumes.

Acceptance checks

Platform Check
Windows With Developer Mode off and a non-elevated T3 process, provision with both a shared directory and loose shared files. Verify same-volume and cross-volume local NTFS layouts, live directory updates through the junction, and the documented behavior for loose files.
macOS Provision with the same project fixture. Verify that shared files and directories are symlinks and that source edits remain visible.
Linux Run the same fixture independently on Linux. Verify live sharing through both file and directory symlinks.

On each OS, exercise normal worktree removal and rollback after failed provisioning. Verify that links and owned checkout artifacts are cleaned up while the shared targets and their contents survive. For Windows, include the cleanup path covered by #21099. Report the three platforms separately and record skipped checks as untested.

Activity

  1. andrerfcsantos commented on Nov 28, 2026

    @andrerfcsantos

    Reproduced on T3 Code desktop 0.1.13 (Windows 11 x64, build 10.0.26300, Developer Mode off, non-elevated, no SeCreateSymbolicLinkPrivilege).

    Minimal layout: the project root is a plain folder (not a git repo):

    my-project/
      repo-a/        (git repo with at least one commit)
      some-folder/   (plain folder, can be empty)
    

    Steps:

    1. Open my-project as a project in the desktop app.
    2. Pick New worktree and send a prompt.

    Result: Workspace preparation failed during provision worktree: Could not create the worktrees: PermissionDenied: FileSystem.symlink (<project-root>\some-folder)

    From server.trace.ndjson (span TaskFolders.create → ThreadLaunchService.prepareInBackground, failed during provision-worktree):

    [cause]: Error: EPERM: operation not permitted, symlink '<project-root>\some-folder' -> '<home>\.t3\worktrees\my-project\t3-…\some-folder'
    

    More detail for this issue:

    • The trigger doesn't have to be shared config like .claude or AGENTS.md. Any non-repo entry in the project root, even an empty folder, goes through linkFolder → fileSystem.symlink (TaskFolders.ts:744 at v0.1.13). My real case was an unrelated empty folder.
    • Which repos are selected in the repository selector doesn't matter. Repos (selected or not) are skipped by linkFolder. Only non-repo entries are symlinked.
    • The same linkFolder/symlink path runs when a repository is added to an existing worktree thread (openLinkedPath and the relink at TaskFolders.ts:1469), and when a missing task folder is restored (TaskFolders.ts:1689). The fix in fix(server): worktree setup links shared project entries without elevation on Windows #44460 should probably cover those too.
    • The rollback after the failure was clean: no leftover worktrees or branches, and the task folder was removed.
    • Workaround: turn on Windows Developer Mode (Settings → System → For developers), which allows unelevated symlink creation.

    Triaged with t3 triage (CLI 0.1.13) by Claude Opus 5.5 (claude-opus-5-5) in Claude Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions