Repository navigation
Description
🧩 Summary
Add first-class support for importing a VS Code multi-root workspace (.code-workspace) into bb — mapping its folders entries onto bb projects/sources — so users who organize their work as a VS Code workspace can bring everything into bb in one step instead of hand-creating a project per folder.
📖 Background
Today bb's model is:
Project = one repository/directory
A VS Code .code-workspace is a JSON file that lists one or more root folders (frequently several independent repos) alongside editor settings:
{
"folders": [
{ "path": "services/api" },
{ "path": "services/web" },
{ "path": "../shared-libs" }
],
"settings": { /* ... */ }
}There is currently no way to:
- point bb at a
.code-workspacefile, or - represent a multi-root workspace as a group of related projects.
Note: I confirmed there is no existing issue or PR for this. Every "workspace" reference in the repo today concerns bb's own environment/checkout concept (the
workspaceslabel), not VS Code workspaces.
🎯 Use case
I keep a multi-root .code-workspace containing several repos I work on together. To use them in bb today I have to manually run bb project create once per folder and keep them in sync by hand. I'd like bb to read the .code-workspace and set this up automatically.
💡 Proposed behavior
Given a path to a .code-workspace, bb parses each folders[].path (resolving relative paths against the workspace file's location) and applies one of two strategies:
| Strategy | Behavior |
|---|---|
per-folder (recommended) |
Create one bb project per folder |
single |
Create a single project rooted at the primary folder, with the rest added via bb project source add |
Suggested CLI surface
bb project import --from-code-workspace /path/to/my.code-workspace \
[--strategy per-folder|single] \
[--machine <id-or-name>]Suggested desktop surface
- An "Import VS Code workspace…" action in the project-creation flow.
❓ Open questions
- Default strategy: per-folder projects vs. single project + multiple sources — or leave it as the
--strategyflag above? - Should bb map any
.code-workspacesettings(e.g. ignored paths) onto project config, or usefoldersonly? - Naming: derive project name(s) from the workspace filename and/or the individual folder names?
🔀 Alternatives considered
Manually creating one project per folder — works, but it's tedious and drifts out of sync whenever the workspace's folder list changes.
Activity
timurkhakhalev commentedon Oct 9, 2026
Proposal: one project with multiple folders, following Codex
I would like to support working across related repositories in a single bb project and thread—for example, updating an API and its frontend together. Importing a
.code-workspacefile would then populate that project's folders.Reference behavior
The Codex project documentation describes this model:
AGENTS.md, skills, and project configuration uses the primary folder; secondary folders do not automatically contribute those files.The last point matters: a worktree isolates the primary repository only. Secondary repositories still use their attached checkouts, which may be shared by multiple threads. The UI should make that behavior clear.
How this fits bb's current model
Existing project sources represent machine-local checkouts. They are not currently a list of repositories available together: the database enforces one source per
(projectId, hostId), and workspace routing resolves a single path.Public source references at
ba5a4c546e7819aa0209371e8045a96f7782aa1a:Consequently, the issue's
singlestrategy needs multi-folder execution support; repeatedly callingproject source addon the same machine would not provide it today.Proposed model
A small extension worth considering is to keep the existing primary source path and attach additional paths to that source. An illustrative shape, not a finalized API contract:
Here,
pathis the primary folder on the source's machine.additionalPathscontains the other attached folders on that same machine. Existing sources would migrate with an empty list. This preserves machine-specific path ownership without introducing a separate repository-management model.Expected behavior:
cwd; provide the additional folders as explicit workspace roots and list them in the agent's context. In a primary worktree, retain the additional folders at their attached paths. Resolve required Git metadata write paths for attached worktrees as well.Suggested implementation sequence
First PR: multi-folder projects. Deliver folder management, agent execution and resume, file discovery, and changes grouped by repository.
Follow-up PR:
.code-workspaceimport. Resolvefolders[].pathrelative to the workspace file, preview the folder list and primary selection, then populate the same model. Import folder entries only initially; editor settings and ongoing synchronization with the file can remain separate work.Acceptance scenarios
This is a design proposal based on public documentation and source inspection; provider behavior has not yet been validated end to end.