DSH (DeepSeek Harness) agents operate by default in a single working directory. When developing projects that involve multiple independent Git repositories, the Agent must switch between different directories or use additional tools to handle file reads and writes, which increases the complexity of session management.
The dsh-plugin-multi-root-workspace plugin solves this problem. Maintained by cherrchen, it expands the writable scope of a DSH Workspace from a single “primary root” to “primary root + N additional roots.” The Agent can access these directories directly without frequent context switching and without learning new tools.
Core Capabilities¶
This plugin primarily provides the following capabilities:
- Extends the Workspace writable scope: Supports a configuration model of “one primary root + N additional roots,” enabling the Agent to read from and write to multiple directories simultaneously.
- Zero learning cost: The Agent continues to use the native
read/write/edit/bashtools, and the plugin does not add anyworkspace_*tools. - Security without degradation: Multi-root authorization uses kernel-level sandboxing (macOS Seatbelt / Linux bwrap / Landlock), and
fsandbash/PTYshare the same security boundary. - No upstream repository modifications: It replaces upstream packages via bundle patches and is an out-of-tree bundle.
- Multi-version compatibility: Supports multiple DSH runtime versions, with compatibility ranging from
0.1.5-rc.2to0.1.7-rc.2. - Management and GUI: Provides the
/workspace-folderscommand-line management tool and a Folders panel in the sidebar.
Installation and Activation¶
In a DSH runtime (web / Electron desktop / headless), install the plugin with the following command:
dsh plugin --profile web add @dsh-electron/dsh-plugin-multi-root-workspace
Installation notes:
* First-time installation: The plugin includes a native dependency, koffi. When running the above command for the first time, you must answer allowBuilds (allow builds); otherwise, the installation fails with [ERR_PNPM_IGNORED_BUILDS].
* Version requirements: The DSH runtime version must be within the supported range (0.1.5-rc.2 to 0.1.7-rc.2); otherwise, the plugin will not start.
After installation, start DSH. A Folders action appears at the bottom of the sidebar, or you can directly enter commands in the session to manage folders.
Usage¶
Command-Line Management¶
You can directly use the following commands in a session to manage multi-root directories:
/workspace-folders # 列出主根与附加根
/workspace-folders add ~/code/another-repo # 添加一个附加根(无参数时打开系统目录选择器)
/workspace-folders alias 1 支付 # 给第 1 个附加根起别名
/workspace-folders remove 1 # 按序号或路径移除
/workspace-folders reveal 1 # 在文件管理器中显示该目录
GUI Management Panel¶
The Folders panel at the bottom of the sidebar provides a graphical interface. The panel lists the primary root and additional roots, and supports operations such as adding, removing, aliasing, copying paths, and revealing in the file manager. Root status is displayed accurately, such as missing (temporarily absent) or redirected (symlink target changed).
Notes¶
- Platform limitations: On Windows, only
fswrite-path coverage for additional roots is supported; restricted bash/PTY does not include this feature. - Configuration validation: Any misconfiguration produces a loud error; the plugin does not silently degrade.
- Development requirements: If building from source or participating in development, Node.js
^22.19.0 || >=24and pnpm 11 are required.