-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
When /ship runs from a git worktree (created by /next-task Phase 3), the merge phase fails because gh pr merge --delete-branch tries to checkout main locally, which is already locked by the main worktree.
failed to run git: fatal: 'main' is already used by worktree at 'C:/Users/avife/agent-sh/web-ctl'
Steps to Reproduce
/next-taskcreates a worktree at../worktrees/web-ctl-fix-XXX- Implementation and PR creation happen from the worktree
ship:shiprunsgh pr merge N --squash --delete-branchfrom the worktreeghtries togit checkout mainafter merge - fails because main is used by the main worktree- Workaround: run
gh pr mergefrom the main repo directory instead
Expected
Phase 6 (merge) should detect it's running inside a worktree and handle this automatically - either by using gh pr merge --repo owner/repo without local checkout, or by switching to the main repo path before merging.
Frequency
This will happen every time /next-task is used, since it always creates worktrees.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels