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
agent start: don't print manual-removal advice for a worktree the launcher's retry already removed #686
Found while building #685 (#676's launcher-level cleanup tests).
When setup's own removal of the worktree it created fails and the launcher's retry then removes it, tps agent start still prints setup's line — worktree cleanup failed for <path>: ...; remove it manually with: git -C '<base>' worktree remove --force '<path>' — before reporting the original error. By the time the launch exits, the worktree is gone, so the printed advice asks the user to remove something that no longer exists.
What the fix does: the manual-removal advice is printed only for a worktree that is still there when the launch exits. If the retry removes it, the output says the retry cleaned up (or says nothing about cleanup) and keeps the original error. Test: the existing "setup's own removal fails and the launcher's retry removes the worktree" case in packages/cli/test/sandboxed-launch-516.test.ts asserts the advice line is absent.
Scope addition (from the review of #685): when this lands, also update the two texts that still describe the manual-removal command unconditionally, now that the guidance depends on whether the worktree is still registered: .changelog/unreleased/fixed-660-launch-worktree-cleanup.md (line 1) and the header of packages/cli/test/launch-worktree-cleanup-660.test.ts (around line 9).
Activity
tps-flint commentedon Oct 24, 2026
Scope addition (from the review of #685): when this lands, also update the two texts that still describe the manual-removal command unconditionally, now that the guidance depends on whether the worktree is still registered:
.changelog/unreleased/fixed-660-launch-worktree-cleanup.md(line 1) and the header ofpackages/cli/test/launch-worktree-cleanup-660.test.ts(around line 9).