Skip to content

New workroom with an agent and a prompt, and fan one prompt out to several workrooms #366

Open

Description

@joelmoss

Inspired by Orca (stablyai/orca, docs/site/content/docs/recipes/parallel-agents.mdx, model/orca-yaml.mdx).

Problem

Creating a workroom gives you a shell. Starting an agent on a task means three more steps: open the workroom, launch the agent, paste the prompt. macapp/WorkroomApp/Views/NewWorkroomDialog.swift has no agent or prompt field. Trying the same task with several agents means repeating all of that per workroom.

What Orca does

  • The create composer can launch an agent with a prompt in the new worktree.
  • setupAgentStartupPolicy: start-immediately | wait-for-setup in orca.yaml decides whether the agent waits for the setup script. A local setting wins over the file.
  • Projects can define issueCommand, a prompt template used when a worktree is created from a linked GitHub or GitLab issue.
  • The "Race three agents on the same task" recipe works like this:
    1. Make three worktrees from the same start ref.
    2. Run a different agent in each (Claude Code, Codex, Cursor) with the same prompt.
    3. Review each diff, then commit and open a PR from the winner.
    4. Delete the losers in one click, which removes both the worktree and the branch.
  • Orca's reasoning: "Different agents make different mistakes… Where three agents agree, the answer is probably right. Where they split, you've found the hard part."

Proposal

  1. Add an optional agent picker (Claude, Codex; AgentBackend in macapp/WorkroomApp/Core/AgentRunner.swift already names both) and a prompt field to the new-workroom dialog. Start the agent in the first pane once scripts/workroom_setup has finished.
  2. Add a CLI equivalent, e.g. workroom create --agent claude --prompt-file task.md, keeping the --json contract (cmd/json.go).
  3. Fan-out: "create N" with one prompt and one agent per workroom, using generated names (internal/namegen). Comparing the results needs a quick per-workroom diff summary. I haven't checked whether the sidebar shows one today (GitDiffStats.swift exists in Core).
  4. Delete the losing workrooms together.

Depends on nothing, but becomes much more useful with #361 (knowing when each agent has finished) and #362 (jumping to them).


🤖 Left by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions