Without the plugin
One session, one writable root
- A change that spans repositories needs one session per repository.
- You carry context between sessions by hand.
- The agent cannot edit the API contract and its client in one turn.
Let a DSH agent read, edit and run commands across several repositories in a single session. The plugin widens the workspace sandbox from one root to a primary root plus N additional roots, keeps the native agent tools, surfaces each root’s own skills under a stable /alias-id:name namespace, and offers optional Auto Review with multi-root context (off by default).
The problem
DSH treats the session origin as the only writable root. Work that spans a service, its client and a design system meant juggling sessions.
Without the plugin
With Multi-root Workspace
Features
The plugin answers one question differently: which directories belong to this workspace. Everything built on that answer keeps working.
Multiple roots
The primary root is the session origin and cannot be removed. Additional roots are canonicalized, checked against the primary root and each other, and kept in an ordered list. Each one carries an access level — inherit, read-only or read-write — a Skills toggle with an editable aliasId, and can be aliased, reordered, copied or revealed in your file manager.

Native tools
The agent keeps using read, write, edit and bash. The plugin adds no workspace_* tools. It replaces the two sandbox provider rows with subclasses that consult one shared scope, so file tools, bash and the terminal all see the same roots.
Unchanged for the agent
Not added
Widened
which directories belong to this workspace?
Workspace management
Manage roots from a session with /workspace-folders, or from the Folders dialog at the sidebar foot of the Web GUI. Both go through the same validated registry, persisted per primary root, and both show the true state of every root.
# list the primary root and the additional roots /workspace-folders# register, name, set access or reveal a root /workspace-folders add ~/code/another-repo /workspace-folders access 1 read-only /workspace-folders skills 1 on /workspace-folders alias-id 1 payments /workspace-folders alias 1 payments /workspace-folders reveal 1 /workspace-folders remove 1Cross-repo workflow
The plugin’s journey test drives a real agent turn across two Git repositories in both the web and headless compositions, using a scripted model endpoint, so it needs no credentials.
Add the other repositories to the session’s workspace.
Describe a change that touches the service and its client.
The agent edits files and runs commands in every granted root.
Each repository keeps its own Git state, so changes stay reviewable.
Workspace instructions
Upstream discovery walks upward from the session directory, so it can never reach an additional root. The plugin adds exactly that missing path, with strict limits.
Security architecture
Additional roots are granted by the same mechanisms the harness already uses, not by prompts and not by switching to full access.
A registration records the canonical directory it was granted for. The scope grants it only while the path still resolves to that directory; a swapped directory or symlink is reported as redirected and not granted.
The in-process fence, the kernel sandbox and the process fence that covers full access all consume the same scope. A parity matrix test compares the fence’s write decisions with the paths each kernel profile grants.
If the upstream sandbox profile cannot be recognized, the plugin refuses to run the command instead of quietly granting only the primary root. An unsupported DSH release stops the gated rows from starting.
Each root is inherit, read-only or read-write. Inherited grants follow the session mode — read-only grants nothing; a fixed read-write root stays writable anyway. Under full access, where upstream bypasses the sandbox, a process fence keeps the denied roots denied.
A store-wide kernel lease means only one process opens the store; other Hosts read and write through their own Registry facades over kernel-authenticated local IPC, and every mutation is ordered at the owner. A contending or disconnected Host publishes an empty scope until background recovery resynchronizes it. Panel requests are tied to a live session, not to a client-supplied path.
Instruction files from additional roots arrive as user-role context and are recorded in the session log like any other model-visible input.
Getting started
The plugin installs through the DSH plugin manager. It is published on npm and works with the web and desktop profiles.
Run this with a supported DSH runtime. Replace the profile for Electron desktop.
Recommended. Pre-built artifacts; no build approval needed.
$ dsh plugin --profile web add @dsh-electron/dsh-plugin-multi-root-workspace$ dsh --profile webPre-built offline package; no build approval needed. The same tgz is on the GitHub Release.
$ pnpm pack @dsh-electron/dsh-plugin-multi-root-workspace$ dsh plugin --profile web add ./dsh-electron-dsh-plugin-multi-root-workspace-0.1.24.tgzPulls source and builds it through prepare. Needs one allowBuilds answer; pin a tag.
$ dsh plugin --profile web add github:cherrchen/dsh-plugin-multi-root-workspace#v0.1.24Links a local checkout for development; no build approval needed. Without a TTY, export CI=true first.
$ git clone https://github.com/cherrchen/dsh-plugin-multi-root-workspace.git$ cd dsh-plugin-multi-root-workspace$ export CI=true$ pnpm install$ pnpm build$ dsh plugin --profile web add "$PWD"npm, tarball and local-path installs need no build approval: the plugin ships no production dependency with a build script, and koffi is supplied by the host as an optional peer. A GitHub install still builds the package through its own prepare script, so pnpm prints one exact key — copy that line into the profile’s pnpm-workspace.yaml and run the install again.
allowBuilds: '@dsh-electron/dsh-plugin-multi-root-workspace@github:cherrchen/dsh-plugin-multi-root-workspace#<commit>': trueThe Folders action appears at the sidebar foot. In a session you can also use the command.
/workspace-folders add ~/code/another-repo /workspace-foldersThe agent now has the same write rights in that directory as in the session’s own workspace.
--profile web with --profile desktop. GitHub installs need one allowBuilds answer for prepare. See the README (opens in a new tab).pnpm dsh instead of dsh.Compatibility
The plugin replaces sandbox providers whose internals carry no semver promise, so it supports exact DSH releases that CI has run — each row lists the releases a published plugin version accepts; the current package is v0.1.24.
| Plugin version | Supported DSH releases |
|---|---|
| v0.1.24latest |
|
| v0.1.23 |
|
| v0.1.22 |
|
| v0.1.21 |
|
| v0.1.20 |
|
Seatbelt profile plus in-process fence
bwrap or Landlock plus in-process fence
Root-set ACL runner (restricted token) plus in-process fence; the confined shell is pwsh
Status is declared per release and never inferred from version order. A green CI run on an unlisted release is evidence, not support. Read the compatibility contract (opens in a new tab) for the rules. Optional Auto Review is jointly verified on twelve exact releases across the 0.2.1, 0.2.2 and 0.2.3 lines and ships disabled.
One command to install. No new tools to learn. Remove the roots and it behaves like it was never there.