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
[Bug]: t3_thread_launch runs in the shared checkout when its HEAD check fails, despite the worktree default #38454
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
Set new threads to start in a worktree (the setting, or defaultThreadEnvMode: "worktree" in t3.json).
Have an agent call t3_thread_launch for that project without a workspaceStrategy.
Make the HEAD check in defaultWorktreeStrategy (apps/server/src/mcp/toolkits/project/handlers.ts) fail for a reason other than "no commit": Git times out on a busy or slow disk, Git cannot be spawned, or Git refuses the checkout (for example fatal: detected dubious ownership).
defaultWorktreeStrategy reads any failure of resolveCommit(HEAD) as "the repository has no commit" and returns no strategy, so the launch falls back to the shared checkout. #38261 already refuses the launch when the branch read fails, but this earlier check still falls back.
Expected behavior
Only Git's own answer that HEAD has no commit (an unborn branch) or that the folder is not a repository keeps the shared fallback. Any other failure refuses the launch with a message to retry or pass workspaceStrategy, as the branch read already does.
Actual behavior
The thread is created in the shared checkout, and its first prompt runs there instead of in a new worktree, so anything it changes lands in the user's working copy.
Activity