Skip to content

feat: asign multiple coding agents the same task (to compete for my admiration) #1267

@rawwerks

Description

@rawwerks

"Let me spin up multiple parallel attempts of the same task (one per agent/worktree) and then I pick and merge/combine the ones I like."

Motivation

Sometimes I just want quick side-by-side alternatives. Fastest path: create isolated attempts, let different agents hack, open PRs, and I merge the ones I like after a quick diff. This stays simple, keeps me in control, and avoids extra orchestration.

Proposed Solution

  • High-level overview
    • Add a lightweight multi-attempt flow that duplicates one task into N isolated contexts (tags/worktrees), launches one agent per context, and opens a PR per attempt. I compare diffs and merge what I want.
  • Technologies / integrations
    • Git worktrees + branch-per-attempt, Task Master tags, existing agent CLIs (Claude/Gemini/etc.).
  • Fit in current workflow
    • Thin wrapper around what already exists:
      • Orchestrator creates N contexts/branches
      • Executors run one agent per context
      • Output is a PR per attempt; I review/merge

High-Level Workflow

  1. Create attempts — Duplicate task <id> into N tags and optional worktrees; create matching git branches.
  2. Run agents — Start one agent per context; stream logs as usual.
  3. Open PRs — When an attempt hits “review,” auto-open a PR named after the agent/context.
  4. Review & merge — I inspect diffs locally or in my VCS UI and merge any subset.
  5. Cleanup — Optionally delete extra branches/tags/worktrees.

Key Elements

  • New minimal CLI
    • multi-attempt start — create N contexts
    • multi-attempt status — show per-attempt progress
    • multi-attempt open-pr — one PR per attempt
    • multi-attempt cleanup — remove extras
  • Lightweight data
    • Task annotation: attempts: [{ tag, branch, agent, status }]
  • No judging, no scores
    • Keep the UX to PRs + diffs + my choice.
  • Safe isolation
    • Deterministic names: attempt-t<id>-<agent>
    • Separate env vars/cache per attempt

Example Workflow

# 1) Create 3 attempts for task 42 with worktrees/branches
$ task-master multi-attempt start --task 42 \
    --agents "claude,gpt-gemini,qwen" \
    --create-worktrees

→ attempts: attempt-t42-claude, attempt-t42-gpt-gemini, attempt-t42-qwen
→ branches: feat/t42-claude, feat/t42-gpt-gemini, feat/t42-qwen
→ worktrees: ../t42-claude ../t42-gpt-gemini ../t42-qwen
→ executors launched (3)

# 2) Check progress
$ task-master multi-attempt status --task 42
→ claude: In Progress (3 commits)
→ gpt-gemini: Review-ready (tests pass)
→ qwen: In Progress (lint clean)

# 3) Open PRs (or auto on “review-ready”)
$ task-master multi-attempt open-pr --task 42
→ PR #121 feat/t42-gpt-gemini
→ PR #122 feat/t42-claude (draft)
→ PR #123 feat/t42-qwen (draft)

# 4) I merge the one(s) I like
$ gh pr merge 121 --squash --delete-branch

# 5) Cleanup leftovers
$ task-master multi-attempt cleanup --task 42 --keep "gpt-gemini"
→ removed tags/branches/worktrees for claude, qwen

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions