Problem
When taskctl start <issue> is run after a previous failed attempt, it fails with:
Failed to create feature branch feature/issue-N: fatal: a branch named 'feature/issue-N' already exists
This blocks retrying failed pipelines without manual cleanup.
Expected Behavior
taskctl start should:
- Option A: Detect and clean up stale branches/worktrees automatically
- Option B: Resume work on existing branches
- Option C: Use unique branch names per attempt (e.g.,
feature/issue-N-attempt-2)
Current Workaround
Manual cleanup:
git branch -D feature/issue-N
git worktree remove .worktrees/task-name
taskctl start N
Quality Gates (Non-Negotiable)
Acceptance Criteria
taskctl start succeeds even if branch already exists
- No manual cleanup required
- Previous failed attempts do not block new attempts
Problem
When
taskctl start <issue>is run after a previous failed attempt, it fails with:This blocks retrying failed pipelines without manual cleanup.
Expected Behavior
taskctl startshould:feature/issue-N-attempt-2)Current Workaround
Manual cleanup:
Quality Gates (Non-Negotiable)
Acceptance Criteria
taskctl startsucceeds even if branch already exists