Skip to content

Refuse default worker forks on SSH remote projects instead of sharing - #1611

Merged
currentbits merged 10 commits into
mainfrom
coder/p1-default-ssh-worker-forks-silently-sha-524796
Oct 13, 2026
Merged

currentbits merged 10 commits into
mainfrom
coder/p1-default-ssh-worker-forks-silently-sha-524796

Conversation

@currentbits

Copy link
Copy Markdown
Owner

What

On SSH remote projects, forkWorkerThread now refuses a default fork. Before this change it quietly fell back to the shared checkout (#1402).

Every SSH worker spawns with cd <remotePath>, so a remote project can't give a worker its own worktree. Before this change, a default fork there quietly fell back to the shared remote checkout. The lead believed its parallel workers were isolated when they were actually editing the same files.

Changes

  • electron/services-threads.js: if the project has a remoteHost, the caller didn't pass worktree:false and the source isn't an Ask thread, the fork throws. The error names host:path and explains that worktree:false runs the worker in the shared remote checkout on purpose. No worker thread is created. This change does not provision worktrees on the remote host; that needs its own decision.
  • electron/orchServer.js:
    • The orchestrator instructions and the thread_fork tool description now say that SSH remotes can't host worker worktrees and what worktree:false does there.
    • The thread_merge and propose-PR messages for workers without a worktree no longer claim the worker asked for worktree:false, because it may not have.

Tests

  • ssh-remote.test.js:
    • A default fork on a remote project throws and creates no worker.
    • Workers forked with explicit worktree:false all resolve their spawn to the same cd '/srv/repo'.
  • orch-server.test.js: the remote-project case now expects a rejection for a default fork and still shares the checkout when worktree:false is passed.
  • orch-merge.test.js: the merge reason no longer mentions worktree:false.

🤖 Generated with Claude Code

Willem and others added 6 commits October 12, 2026 12:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T20:16:51.261731Z 694ab28 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits merged commit 8b86184 into main Oct 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant