Skip to content

P1: Default SSH worker forks silently share the remote checkout #1402

Closed

Description

@currentbits

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.canHostWorktree returns false whenever project.remoteHost is set. forkWorkerThread only sets pendingWorktree if that predicate is true.
  • runner.resolveSpawn calls wrapCommand, whose SSH branch executes cd <project.remotePath> && ... for every worker. Worker IDs do not affect that path.
  • An isolated forkWorkerThread store harness created two default SSH workers: both orchWorker:true, pendingWorktree:false, cwd /srv/repo. This is a code-path reproduction; no remote host or live agents were used.
  • orchServer tool 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_merge checks only !worker.worktreePath and describes that case as an explicit worktree:false fork.

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_fork cannot 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_merge does not claim worktree:false was requested when the fork omitted it.

Related #1223 concerns the separate Best of N launch path, not SSH orchestration forks.

Activity

  1. added
    plan:todo
    on Oct 1, 2026
  2. currentbits commented on Oct 1, 2026

    @currentbits
    OwnerAuthor

    Follow-up from the local shared-checkout path: the same thread_merge early return applies to an explicit worktree:false worker whose lead has its own worktree. The worker edited project.path; the lead's branch is at self.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.

  3. added
    plan:doing
    plan:done
    and removed
    plan:todo
    plan:doing
    on Oct 12, 2026
  4. currentbits commented on Oct 13, 2026

    @currentbits
    OwnerAuthor

    Landed from Solenta thread "P1: Default SSH worker forks silently share the remote check" (PR #1611). Closed on merge.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions