Parallel agent worktree race with Orca and Codex
Discovered from README cross-links · 2 days ago
Fan one prompt across isolated git worktrees, compare diffs, merge the winner.
What they did
They set up Orca as a desktop orchestrator on their repo and used its parallel worktree feature to fan a single refactor prompt across multiple Codex agents. Each agent ran in its own isolated git worktree so edits never collided. They watched progress in split terminals, used the mobile companion to get a ping when runs finished, and then reviewed each worktree's diff side by side. The winning branch was merged back into main and the losing worktrees were discarded. They also used Design Mode to click a UI element in the Chromium window and drop its HTML, CSS, and a cropped screenshot directly into a follow-up Codex prompt for a polish pass.
How it went
The race produced several independent implementations of the same change, which made comparison fast and reduced the risk of a single bad agent run. The merged result needed only a light cleanup pass, and the Design Mode follow-up fixed a spacing issue without manual screenshotting. Worktree cleanup and branch naming still required a bit of manual housekeeping.
Worth knowing
Requires Orca installed plus a Codex CLI configured and authenticated on the machine. Parallel agents consume tokens and disk quickly, so cap the fan-out. Worktrees need pruning after merges, and the mobile companion needs pairing with the desktop app. Design Mode only works against a real Chromium window, not headless runs.
Wiring
Install Orca from onorca.dev and open the repo as a project. Ensure the Codex CLI is installed and authenticated so Orca can spawn it. Use the parallel worktree action to create N worktrees from the base branch, each with its own agent session. Terminals are split per worktree for live output. The mobile companion pairs via the desktop app for finish notifications and follow-up messages. After runs complete, review diffs in Orca's comparison view, merge the chosen branch with git, and prune the rest. Design Mode launches a Chromium window tied to the running dev server and injects element HTML/CSS plus a cropped screenshot into the active agent prompt.
Try it yourself
Open this repo in Orca. Create four parallel git worktrees from main and launch a Codex agent in each with this prompt: 'Refactor the settings module to remove duplicated validation logic, keep public APIs unchanged, and add tests.' When all four finish, show me a diff summary per worktree, rank them by smallest diff and test pass rate, and merge the best one into main. Then open the app in Design Mode so I can point at the settings panel and send a follow-up polish prompt to Codex.