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
feat(repos): worktrees add takes over the staged branch of an issue instead of refusing it #2657
Parent: #2653. devops repos worktrees add refuses an issue when origin holds a branch <type>/<issue>-<slug> for it (#2337). After the stage job (#2654) pushes such a branch, no agent can make the worktree of a staged item, and the staged change is lost to them.
Proposed Solution & Architectural Design
worktrees add <issue> reads the pushed branch of the issue. When every commit past origin/<default> has the App's bot login as its author (service.github_app.slug with the [bot] suffix), the command takes the branch over: it makes the worktree on that branch, tracking origin, and reports that it took over a staged branch with the number of commits. A branch with a commit by any other author is refused as today, naming the author.
When the staged branch exists, the command takes type and slug from it. A --type or --slug that differs from the branch is an error that names the branch.
A stopped implement run (the sibling job of the parent) leaves the App's code commits on the branch. The same rule takes them over, so an agent continues where the job stopped.
--dry-run lists the ls-remote and log reads it makes.
CONTRIBUTING.md ("Naming", the worktree row), docs/ROUTINE_TASKS.md and docs/SDLC.md Phase 1 say that worktrees add takes over a staged branch.
git (ls-remote, log --format=%an, worktree add --track). Nothing new is built.
Acceptance criteria
With git faked at the process edge, worktrees add on an issue whose pushed branch holds only the App's commits makes the worktree on that branch and reports the takeover.
A pushed branch with one commit by another author is refused, naming the author.
A --slug that differs from the slug of the staged branch is an error.
uv run devops ci passes, and devops docs generate --sync-readme is run.
Activity
dan-petty commentedon Oct 29, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The title uses the feat prefix and the body proposes new behaviour for worktrees add.It blocks the agent workflow after a stage job pushes a branch, but it is one step in the pipeline, not a total outage.It unblocks agents from creating worktrees on staged items, which is a recurring step in the SDLC.It needs author-check logic, error paths for conflicting flags, dry-run output, docs updates, and tests with faked git.devops repos worktrees) #700, which asks for a different change.Both target the devops repos worktrees subsystem, but 700 adds inventory and orphan reclamation while this adds branch takeover on add.chore(main): release 0.17.0 (#2683)
fix(roadmap): the status label follows the pull request (#2723)