Skip to content

bug: agents working on issues don't create dedicated worktrees #459

@Luis85

Description

@Luis85

Summary

When agents start working on a GitHub issue (e.g. via the tackle-issue flow), they branch out from the current branch directly instead of creating a dedicated git worktree. This blocks multi-agent parallelism because two agents editing the same working tree will collide.

Current behaviour

Agent picks up an issue → creates a branch from the current branch in the main working tree → works there until PR is merged.

Expected behaviour

  1. On issue start — agent creates a dedicated worktree under .worktrees/<issue-slug>/ (or equivalent), checks out a fresh branch there, and performs all work in that worktree.
  2. PRs are opened from the worktree branch — the worktree branch is pushed and the PR is linked to it.
  3. On PR merge — the worktree is automatically cleaned up (branch deleted, .worktrees/<slug>/ removed).

Why it matters

  • Multiple agents can't safely work on the same codebase simultaneously from the same working tree.
  • The worktrees convention already exists (docs/worktrees.md, feedback_worktrees_required.md, superpowers:using-git-worktrees skill) but is not wired into the issue-tackling entry point.

Acceptance criteria

  • The issue-tackling flow reads superpowers:using-git-worktrees (or equivalent) before any file edits.
  • A worktree at .worktrees/<issue-slug>/ is created for every issue session.
  • The PR is opened from the worktree branch, not from whatever branch the main tree was on.
  • After the PR is merged, the worktree folder and its branch are removed (can be a follow-up step or hook).
  • Existing docs/worktrees.md guidance is referenced or updated to cover the issue-tackling entry point.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2High / next-up, important but not blockingbugSomething isn't workingtrack:specorator-improvementImprovement to the Specorator template itself

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions