Preface¶
Some compatibility issues in DSH do not necessarily require changes to the main program; they can be worked around with a removable plugin first. dsh-same-mode-sandbox-noop is a compatibility plugin for DeepSeek Harness / DSH 0.1.0-rc.6, maintained by zhangzujian, designed to handle redundant sandbox_permissions and justification fields that appear in tool calls such as bash, pwsh, write, and edit.
What This Is¶
This is a removable compatibility plugin for DSH 0.1.0-rc.6. It does not replace DSH, nor does it add a new set of sandbox policies; it only removes redundant fields from known non-escalation requests before DSH snapshots and freezes tool parameters, then lets the original runtime continue execution according to existing policies.
The license is MIT, requiring Node.js >=22.
Core Features¶
The plugin wraps two entry points:
ctx.tools.execute()- The preparation entry point of the DSH
0.1.0-rc.6Agent Loop scheduler
These operations occur before DSH snapshots and freezes tool parameters. For bash, pwsh, write, and edit, when the request’s sandbox mode is equal to or narrower than the effective mode of the calling session, the plugin removes the paired sandbox_permissions and justification fields.
The following cases are passed through to DSH unchanged:
- Genuinely broader mode requests
- Unknown modes
- Incorrectly formatted parameter pairs
- Unrelated tools
- Calls without escalation fields
For known non-escalation requests, if justification is empty, the plugin removes it along with the redundant permissions fields before DSH validation. For genuinely broader requests, an empty justification is still left for DSH to validate according to its original rules. When the plugin is removed or disposed of, the original runtime methods are restored.
Installation and Enabling¶
First, confirm that the local Node.js version meets >=22. The following uses the web profile as an example to install a local directory:
git clone https://github.com/zhangzujian/dsh-same-mode-sandbox-noop.git
cd dsh-same-mode-sandbox-noop
npx @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web add "$PWD"
After installation, restart dsh web to activate the plugin.
To remove it:
npx @deepseek-ai/dsh@0.1.0-rc.6 plugin --profile web remove @zhangzujian/dsh-same-mode-sandbox-noop
Typical Usage¶
One-off Local Overlay¶
If you don’t want to install it into a profile, you can insert the plugin by file URL in a patch loaded after the base bundle:
- insert:
- id: same-mode-sandbox-noop
name: file:///absolute/path/to/dsh-same-mode-sandbox-noop/index.mjs
Here, replace file:///absolute/path/... with the actual local path.
Running Tests¶
Unit tests only require Node.js:
npm test
Integration tests require pointing to an installed DSH directory:
DSH_INSTALL_DIR=/path/to/npx/cache/package npm run test:integration
DSH_INSTALL_DIR points to the directory containing node_modules/@deepseek-ai.
Applicable Scenarios and Notes¶
This is suitable for temporarily circumventing redundant sandbox fields in known non-escalation requests within a DSH 0.1.0-rc.6 environment. It is an out-of-tree compatibility workaround; if a later version of DSH handles non-escalation requests within the shared sandbox escalation layer, the DSH native implementation should be preferred.
Since the plugin hooks into DSH’s tool execution and scheduling preparation paths and runs with the current dsh process permissions, you should review the repository source code, license, and dependencies before installation. The license is MIT, and the maintainer is zhangzujian.
GitHub repository:
https://github.com/zhangzujian/dsh-same-mode-sandbox-noop
Conclusion¶
This plugin has a narrow scope: it only removes redundant fields from known non-escalation requests in specific paths of DSH 0.1.0-rc.6, while leaving genuinely escalation-required requests for DSH to validate as before. If you are troubleshooting sandbox field compatibility issues in bash, pwsh, write, or edit calls, you can use this solution for isolated testing first.