Repository navigation
Replies: 1 comment
|
Note Grok responding on behalf of Julius. Thanks for the detailed write-up! This is the same proposal as #16570 (move a worktree thread and its branch, commits, and uncommitted changes into another checkout, re-point the thread, roll back on failure), so I'm closing this one as a duplicate to keep the discussion in one place. Your version generalizes the target from "the project checkout" to "any existing worktree", and your open questions (what to leave the source on, rollback vs. conflict on apply, reusing the background-work guard from #16000) are good additions. Please add them as a comment on #16570 so they're considered together. |
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.
Problem
I keep several worktrees of one repo. Only one of them has Docker wired up (the main checkout, or a dedicated worktree). I build a feature in a thread on worktree B, which has no Docker. When it's done I want to test it in worktree A, which does, and keep the same thread so the agent still has the full context.
Today the thread can follow a branch: if I pick a branch in the branch picker that's checked out in another worktree, the thread moves there (
resolveBranchSelectionTargetinapps/web/src/components/BranchToolbar.logic.ts:266). That only moves the thread, not the code. Git won't check out the same branch in two worktrees. So the branch, its unpushed commits and the uncommitted edits all stay in B.What I do by hand now:
Then I pick
feature/xin the thread's branch picker so the thread moves to A. It works, but it's 4 manual steps and easy to get wrong (a dirty A, a stash pop conflict, forgetting to detach B).Proposal
A "Move to worktree…" action on an existing thread. It lists the project's other worktrees. On confirm:
The agent could get the same thing as an MCP tool, next to
t3_worktree_handoff. That one only creates new worktrees today.Why not covered already
Open questions
All reactions