Repository navigation
Description
User outcome: run two providers on the same coding task and compare independent changes, without both editing the main checkout.
Competitor evidence: Orca's first three-agent session, checked 2026-09-10, creates one worktree per implementation before sending the same prompt. This is official-documentation comparison, not a live Orca test.
Solenta source evidence at 9fc8645: runBestOfN calls onFork with provider/model only, then starts each resulting thread. App.handleForkOpen and useCoder.forkThread forward those options. services.forkThread marks pendingWorktree only for explicit worktree:true. The ordinary user-facing race therefore requests fresh threads without isolated worktrees. The source's code branch is not inherited by that service either. This is a traced call chain, not a live overwrite experiment; no claim is made that agents have already damaged files.
Smallest useful scope: give the Best of N implementation path an explicit isolated-workspace contract, carried through the existing fork service and lazy materialization. Each candidate needs a distinct branch/path and the same declared committed starting point. Separate that starting point from its later merge/PR destination. Reuse the snapshot contract in #948 and base-selection primitives in #187/#775; do not build another worktree manager. The isolation choice must be made before any candidate starts, not patched onto a thread afterward.
Acceptance:
- A two-provider race creates two distinct candidate worktrees. An edit in either candidate cannot appear in the other or the main checkout.
- All candidates use the same captured committed start revision even if the source advances while the race is being launched.
- Show the starting branch/short SHA. Uncommitted source edits are not silently copied, committed or claimed as included.
- Failure to create a worktree cannot fall back to running that candidate in the shared checkout. Existing successful candidates remain inspectable after a partial launch failure.
- Unsupported projects get a clear preflight result, rather than launching an unsafe parallel implementation.
- Preserve explicit worktree:false research/orchestration forks and existing Ask behavior. Do not change every ordinary Fork or provider handoff implicitly.
- Trace sibling user-fork callers during implementation so they retain their deliberate semantics; share only the relevant isolation/start-point plumbing.
- Verify the actual Best of N-to-service flow plus a disposable real-Git fixture with two candidate paths and independent edits. No live agents are needed for the regression.
Dedup: #30 delivered orchestration-worker isolation, but runBestOfN calls ordinary forkThread. #281 is candidate grading, #241/#344 planning/sketch races, #237 same-thread provider handoff and #240 stacked-PR navigation. #948 is CLOSED plan:done with a merge comment and covers orchestration source snapshots; coordinate its contract rather than treating source provenance as a new research finding. This ticket owns the Best of N launch integration and candidate isolation only.
Activity
currentbits commentedon Sep 10, 2026
Best of N implementation races now fork with isolate:true before any candidate starts.
Verified with electron/test/best-of-n-isolate.test.js (two real git worktrees, independent edits) plus Best of N-to-service renderer/App tests. No live agents.
feat(threads): launch Best of N into isolated candidate worktrees (#1223
feat(threads): isolate contract for Best of N forks (#1223) (#1270)
feat(threads): fail-closed isolate:true on forkThread (#1223) (#1271)
feat(threads): isolate contract for Best of N forks (#1223)
feat(threads): fail-closed isolate:true on forkThread (#1223) (#1271)