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]: Thread worktree keeps the PR branch checked out after the PR is opened, so the user can't check it out in their own clone #36415
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
Start a thread in a new worktree. Its branch ends up as feature-x (renamed from t3/<id> or chosen by the user).
Let the agent commit, push and open a PR for feature-x.
In the user's main clone of the same repo, run git checkout feature-x.
Expected behavior
Once the PR is open, the user can check out feature-x in their own clone to review or keep working on it.
Actual behavior
fatal: 'feature-x' is already used by worktree at '~/.t3/worktrees/<project>/<thread-id>'
The thread's worktree keeps feature-x checked out until the user switches it away by hand. I haven't isolated whether the worktree holds the branch from creation or only from the PR onward. Either way, it still holds the branch after the PR is open.
The only workaround is git switch --detach in the thread's worktree, and it causes two more problems:
Activity