Repository navigation
Description
Problem
Default thread_fork on an SSH remote project silently runs workers in the same remote checkout. Parallel coding workers can edit one another's files, despite the tool's promise that each worker has its own worktree and branch. thread_merge then reports "worktree:false ... changes are already there" even though the caller did not request worktree:false.
Evidence (origin/main e2924af, 2026-10-01)
services.canHostWorktreereturns false wheneverproject.remoteHostis set.forkWorkerThreadonly setspendingWorktreeif that predicate is true.runner.resolveSpawncallswrapCommand, whose SSH branch executescd <project.remotePath> && ...for every worker. Worker IDs do not affect that path.- An isolated
forkWorkerThreadstore harness created two default SSH workers: bothorchWorker:true,pendingWorktree:false, cwd/srv/repo. This is a code-path reproduction; no remote host or live agents were used. orchServertool instructions say "The worker runs in its own git worktree and branch so parallel workers never edit the same files (pass worktree:false to share the project checkout)." The unsupported SSH exception is not disclosed.thread_mergechecks only!worker.worktreePathand describes that case as an explicitworktree:falsefork.
Smallest safe outcome
Preflight a default coding fork on an SSH project and make the lack of isolation explicit. Do not silently launch parallel writers under an isolation promise. A clear unsupported result is enough initially; remote worktree provisioning can be a separate decision if demand warrants it. Preserve an explicitly requested worktree:false path with an accurate shared-checkout warning and merge result.
Acceptance
- Default
thread_forkcannot silently start an SSH coding worker in a shared remote checkout. - Explicit shared-checkout forks remain available, and tool/UI text accurately describes their behavior.
- A test with two SSH workers proves both resolve to the same remote path under the old behavior and proves the new preflight behavior. No SSH server is needed.
thread_mergedoes not claimworktree:falsewas requested when the fork omitted it.
Related #1223 concerns the separate Best of N launch path, not SSH orchestration forks.
Activity
currentbits commentedon Oct 1, 2026
Follow-up from the local shared-checkout path: the same
thread_mergeearly return applies to an explicitworktree:falseworker whose lead has its own worktree. The worker editedproject.path; the lead's branch is atself.worktreePath. The response "changes are already there; nothing to merge" is true only of the project checkout, not the lead's checkout. Keep the fix scoped to truthful path/branch reporting or an actionable refusal; there is no worker branch to squash. This extends the acceptance check for accurate shared-checkout merge results to local projects as well as SSH projects. No live overwrite was observed.currentbits commentedon Oct 13, 2026
Landed from Solenta thread "P1: Default SSH worker forks silently share the remote check" (PR #1611). Closed on merge.