pingdotgg / pingdotgg/t3code

[Bug]: Removing worktree breaks thread when checking out branch elsewhere

Open
#8,263 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Main project: cd ~/path/to/project
  2. git worktree add ~/path/to/project-worktrees/feature/some-feature feature/some-feature
  3. Thread in Worktree
  4. git worktree remove ~/path/to/project-worktrees/feature/some-feature
  5. git checkout feature/some-feature
  6. Send message in thread
Expected behavior
  1. Switch to the main project or a worktree that has the branch or otherwise to the main project?
Actual behavior
  1. 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
Image
Workaround
  1. git switch off of feature/some-feature
  2. Send message in thread
  3. T3Code recreates the worktree
  4. Within T3Code: switch to a branch that's checked out elsewhere to leave the worktree
  5. Remove the worktree
  6. git switch feature/some-feature

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.