[Bug]: Removing worktree breaks thread when checking out branch elsewhere
Open
Nobody has claimed this yet.
bug
needs-triage
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Related to https://github.com/pingdotgg/t3code/pull/7839
Area
apps/server
Steps to reproduce
- Main project:
cd ~/path/to/project git worktree add ~/path/to/project-worktrees/feature/some-feature feature/some-feature- Thread in Worktree
git worktree remove ~/path/to/project-worktrees/feature/some-featuregit checkout feature/some-feature- Send message in thread
Expected behavior
- Switch to the main project or a worktree that has the branch or otherwise to the main project?
Actual behavior
VCS process failed in GitVcsDriver.initRepository: git (/Users/user/path/to/project-worktrees/feature/some-feature) exited with 128 - Process exited with a non-zero status.
Impact
Major degradation or frequent failure
Version or commit
0.0.35-nightly.20260826.1194
Environment
No response
Logs or stack traces
Screenshots, recordings, or supporting files
Workaround
git switchoff offeature/some-feature- Send message in thread
- T3Code recreates the worktree
- Within T3Code: switch to a branch that's checked out elsewhere to leave the worktree
- Remove the worktree
git switch feature/some-feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/server and reproduce the listed git worktree removal and branch checkout sequence. Then inspect GitVcsDriver.initRepository and trace how the removed worktree path is handled when a thread sends a message. Done means the thread can continue without the failed VCS process, using the main project or an available worktree as appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- backend, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100