Skip to content

Task fan-out: create worker worktrees with pre-seeded agent sessions in one action #137

Description

@liam-russell

Problem

Farming a plan out to N parallel workers is entirely manual today, per worker: create a worktree, open its terminal, launch an agent (agent:launch), paste a prompt. For a five-subtask plan that's ~20 interactions — and nothing records which worktree belongs to which subtask.

Proposal

A fan-out action, available both as a dialog and as an MCP tool (so the planner agent in the orchestration worktree #134 can call it directly, relates #99):

Input: a list of subtasks { title, prompt, agent? } plus a base ref (typically the orchestration branch). For each subtask:

  1. Create a worktree + branch off the base (needs Pick a base branch/ref when creating a worktree #135).
  2. Launch the chosen agent in it — per-subtask agent/model choice, so a strong planner can dispatch cheaper workers (e.g. Sonnet).
  3. Seed the initial prompt with the subtask description plus a pointer to the shared plan/steering docs on the orchestration branch.
  4. Record provenance (existing worktree:listProvenance / worktree:getProvenance) linking worktree → plan → subtask, which feeds the grouped sidebar (Stacked-work view: group workers under their orchestration branch, review merges, roll-up PR #136).

UI: a confirmation step before spawning ("these 5 worktrees will be created, each launching "), then per-worktree progress. Worktree items show their subtask title.

Note: agents that run git worktree add themselves are already adopted as external worktrees — this is the managed, one-action path with provenance and seeded sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Differentiator — strengthens the worktree-first / agent-native storyarea:featureNew functionalityenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions