You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support repo-local worktree location (<repo>/.wt, git-wt style) #33047
Allow new worktrees to be created inside the repository at <repo>/.wt/<name>, the default layout of git-wt (wt.basedir, default .wt).
Current behaviour
New worktrees go under a single machine-wide directory (~/.t3/worktrees by default, or the absolute path set in Settings → Worktrees → Worktree location). resolveWorktreesDirectory in apps/server/src/worktreesDirectory.ts only accepts an absolute folder, so a per-repository, repo-relative location cannot be expressed.
Proposal
Accept a repo-relative worktree location, e.g. .wt, resolved against the project root (git-wt's wt.basedir also supports {gitroot}-style templates, which could be considered later).
Make .wt selectable, or the default for projects that already use git-wt, so worktrees created by T3 Code and by git wt live side by side.
Keep the setting per machine, and leave existing worktrees where they are, as today.
Things to handle
The base directory is inside the repository, so it must be excluded from git status. git-wt leaves this to the user (.gitignore or .git/info/exclude); T3 Code could add the entry to .git/info/exclude itself.
Storage cleanup and known-workspace discovery (storageCleanup.ts, KnownWorkspaces.ts) currently use managedWorktreesDirectories and must also recognise <repo>/.wt.
Tooling that walks the repository (file search, watchers, indexing) must skip .wt, otherwise nested worktrees are scanned recursively. git-wt documents the same caveat.
The project's own worktree-specific handling (for example isServerInternalPath) should treat .wt as managed.
I have another use case for this, which came up in a t3 triage session.
Some of my projects keep a shared CLAUDE.md in the parent directory of the repository, for example ~/code/acme/CLAUDE.md above ~/code/acme/repo. Claude Code reads CLAUDE.md files from every ancestor of its working directory. Threads that run in a T3 worktree under ~/.t3/worktrees/<repo>/<branch> never see that file, so the agent misses project-specific instructions.
Pointing Worktree location at the parent directory does not work for me. The setting is machine-wide, so worktrees of every other project would land there too and pick up the wrong CLAUDE.md.
The repo-local location proposed here would solve this. With <repo>/.wt/<name>, the parent directory stays an ancestor of every worktree.
The same layout has a side effect. The main checkout's CLAUDE.md at <repo>/CLAUDE.md also becomes an ancestor of each worktree. Claude Code would load it in addition to the worktree's own copy, and the two files may differ on the worktree's branch.
Environment: T3 Code 0.1.7, desktop app with local server, macOS 27.2 (arm64).
Written with Claude Code (Claude Opus 5.5) during t3 triage.
Activity
V1ncNet commentedon Nov 9, 2026
I have another use case for this, which came up in a
t3 triagesession.Some of my projects keep a shared
CLAUDE.mdin the parent directory of the repository, for example~/code/acme/CLAUDE.mdabove~/code/acme/repo. Claude Code readsCLAUDE.mdfiles from every ancestor of its working directory. Threads that run in a T3 worktree under~/.t3/worktrees/<repo>/<branch>never see that file, so the agent misses project-specific instructions.Pointing Worktree location at the parent directory does not work for me. The setting is machine-wide, so worktrees of every other project would land there too and pick up the wrong
CLAUDE.md.The repo-local location proposed here would solve this. With
<repo>/.wt/<name>, the parent directory stays an ancestor of every worktree.The same layout has a side effect. The main checkout's
CLAUDE.mdat<repo>/CLAUDE.mdalso becomes an ancestor of each worktree. Claude Code would load it in addition to the worktree's own copy, and the two files may differ on the worktree's branch.Environment: T3 Code 0.1.7, desktop app with local server, macOS 27.2 (arm64).
Written with Claude Code (Claude Opus 5.5) during
t3 triage.juliusmarminge commentedon Nov 12, 2026
This is the same problem as #27656, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.