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]: Deleting a thread's worktree discards uncommitted changes without warning #37769
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Create a thread in worktree mode.
In the worktree, edit a tracked file and leave it uncommitted.
Delete the thread and answer yes to "Delete the worktree too?".
Expected behavior
T3 Code runs git worktree remove without --force first. If Git refuses because of local changes, it shows what would be lost and asks again before forcing.
Storage cleanup already works this way: storageCleanup.ts checks for local changes before it removes a worktree. Deleting a thread doesn't.
Actual behavior
The edit is gone. The dialog doesn't mention uncommitted changes, and useThreadActions.ts then calls removeWorktree with force: true, which skips Git's own dirty check. With automatic worktree cleanup on delete turned on, there is no dialog at all.
The same happens to a nested checkout inside the worktree, such as another repository's worktree that a setup script placed in a subdirectory. Its edits are lost too, and that repository keeps a stale prunable entry in git worktree list.
Activity