[Feature]: Clean up worktrees for settled threads without deleting history #6856
AkiLetschne
started this conversation in
Ideas
Replies: 2 comments
|
I am also encountering this issue, it makes it inconvenient to use sidebar v2 without manually doing the second step of archiving as well |
0 replies
|
I agree that the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/web, apps/server
Problem or use case
Sidebar V2 can classify threads as settled manually, after a PR is merged or closed, or after inactivity. Settling only changes the thread lifecycle and UI state. The linked worktree stays on disk.
With a worktree-first workflow, finished threads can leave behind many checkouts containing
node_modules, build outputs, and other generated files. Deleting the thread can remove an orphaned worktree, but it also deletes the conversation history. I want to keep the settled thread while releasing its worktree.Proposed solution
Add a safe Remove worktree action for settled threads.
Normal removal should only be allowed when the worktree:
The thread, branch, and conversation history should remain. If the thread is used again, T3 Code could recreate the worktree or offer to do so.
A later extension could auto-prune safe worktrees after a configurable number of days settled. Automatic cleanup should never force-delete dirty or unpushed work.
Smallest useful scope
A manual action in the settled thread context menu, with a confirmation and a clear reason when removal is blocked.
Alternatives considered
Examples or references
Contribution
All reactions