fix: open isolated multi-repo runs as a multi-root workspace - #294
Merged
LoganRupe merged 1 commit intoSep 23, 2026
Merged
Conversation
"Open in" on an isolated run opened the anchor worktree as a plain folder, so the other repos were missing from the editor. The worktree fan-out now writes a copy of the project's .code-workspace into the per-thread directory, with each repo folder pointed at its worktree and non-repo folders left at their original path. The client opens that copy for fanned-out threads. Threads created before this have no copy, so the launcher falls back to the directory when the workspace file is missing. Fixes #125
LoganRupe
added a commit
that referenced
this pull request
Sep 24, 2026
"Open in" on an isolated run opened the anchor worktree as a plain folder, so the other repos were missing from the editor. The worktree fan-out now writes a copy of the project's .code-workspace into the per-thread directory, with each repo folder pointed at its worktree and non-repo folders left at their original path. The client opens that copy for fanned-out threads. Threads created before this have no copy, so the launcher falls back to the directory when the workspace file is missing. Fixes #125 Co-authored-by: Logan Rupe <logzerroneous@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
The isolated-run worktree fan-out now writes a copy of the project's
.code-workspaceinto the per-thread directory (<worktreesDir>/<projectId>/<threadId>/<name>.code-workspace). Each repo folder in the copy points at that thread's worktree (as a relative path); folders that aren't repos, like adocsdir, keep their original absolute path.settingsand other keys carry over."Open in" hands that copy to workspace-aware editors when the thread has fanned-out worktrees. Client and server derive its path with one shared helper,
threadWorkspaceFilePathinpackages/shared/src/path.ts.Threads created before this have no copy on disk, so the editor launcher now checks the workspace file exists and falls back to the directory instead of a failed open.
The file lives in the per-thread directory, so it goes when that directory does. No extra cleanup code.
Why
Fixes #125. For a
.code-workspaceproject, "Open in" on an isolated run opened only the anchor worktree as a plain folder, so the other repos were missing from the editor. Pointing at the project's own workspace file would have opened the original checkouts instead of the thread's worktrees.Verified:
path.test.ts,WorktreeFanout.test.tsandexternalLauncher.test.tspass; server and web typecheck clean. In a real dev build, an isolated run opens asshop (Workspace)with every repo, and a pre-fix thread still opens its anchor folder with no error.UI Changes
Before/after, "Open in" on an isolated run of a three-folder workspace (two repos plus a non-repo
docsfolder):issue-125-before-after.mp4