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
Let a thread move back to the project's main checkout #30
A thread attached to a worktree can't return to the project's main checkout. t3_worktree_handoff only moves a thread into a new worktree and fails when the thread is already attached, and t3_thread_update says workspace and branch changes are intentionally unsupported. The owner's rule (2026-10-13) is that orchestrator threads always work on main in the main checkout, so an orchestrator that was started in a worktree is stuck there, still showing the worktree's old branch.
Done when
A thread can be re-pointed at the project's main checkout (workspace root) from the UI and through an MCP tool (for example a root target on t3_worktree_handoff, or a separate tool). Same safety as the existing handoff: it ends the live provider session and can queue a continuation prompt.
The thread's recorded branch updates to what the target checkout is on.
Optional: offer to remove the left-behind worktree when it is clean.
Agent tool:t3_worktree_return_to_root (optional continuationPrompt). It records the main checkout's current branch, or none on a detached HEAD, and leaves the old worktree on disk.
App:Move to main checkout in the workspace menu of a worktree-bound thread.
Shared rules: both directions share one safety check and the existing detach-after-commit, and the next turn starts in the main checkout.
Behavior change:t3_worktree_handoff is now refused when an unfinished run has no live session to detach, for example a stale run left after a restart.
Review: Opus said ship; its follow-up cleanups are applied. 139 focused tests pass.
Activity
refactor(threads): return-to-root checks live in the worktree service
tannerpolley commentedon Oct 14, 2026
Done on
main(bf2701f, bb1faf8); ships in v2.12.t3_worktree_return_to_root(optionalcontinuationPrompt). It records the main checkout's current branch, or none on a detached HEAD, and leaves the old worktree on disk.t3_worktree_handoffis now refused when an unfinished run has no live session to detach, for example a stale run left after a restart.fix(shared): label t3_worktree_return_to_root in the tool list