Skip to content

Multi-Root Workspaces

VS Code lets one workspace contain several folders (a multi-root workspace). Dline supports multi-root workspaces by default; nothing needs to be turned on.

  • Each workspace folder is a root, and the first folder is the primary root.
  • A root’s name is its folder name (the last segment of its path); aliases set in a .code-workspace file are not read.
  • For each root, Dline records its absolute path, whether it is a Git repository, and its current commit.
  • The roots’ names, paths, and version-control types are provided to the model, along with which root is primary.
OperationWhen no root is specified
Reading and writing filesThe path is resolved in the primary root
Searching files (search_files)All roots are searched
Running commandsCommands run in the primary root; Dline can set the working directory to another root

The model can include a root name in a path to target that root. If the named root does not exist, file tools fall back to the primary root.

Naming the project in your prompt (for example “change … in frontend”) helps Dline pick the right root, but this depends on how the model interprets it.

  • @frontend:/src/App.tsx looks only in the root named frontend;
  • @/src/App.tsx looks in every root and may return files with the same path from several roots.

Note that when you name a root, the part after the colon must start with /. A root name that does not exist reports Workspace '<name>' not found; a file found in no root reports File not found in any workspace. Searched: ….

FeatureBehavior in a multi-root workspace
Workspace rules and skillsLoaded only from the first workspace folder’s .agents/rules/, skills folders, and similar locations; other roots are not read separately
Global rulesLoaded from <documents-root>/rules/ as usual
@git-changes and commit mentionsApply to the primary root only
CheckpointsUnavailable. The task header shows “Checkpoints are not currently supported in multi-root workspaces.” with Retry Checkpoints and Disable Checkpoints

If you need checkpoints, open a single project folder in a new VS Code window and start a new task there.

If the multi-root workspace fails to initialize, Dline reports “Failed to initialize workspace. Using single folder mode.” and continues as a single-folder workspace.