Plugin directory / Security / dsh-escalation-tolerance
dsh-escalation-tolerance
Verified · install-tested on dsh ericleoo
What it does
Tolerate redundant sandbox_permissions requests: a Cordis plugin that turns hard failures into harmless no-ops when a tool asks for a permission mode that is already active.
Works — verified, early-stage project
Tolerate redundant sandbox_permissions requests: a Cordis plugin that turns hard failures into harmless no-ops when a tool asks for a permission mode that is already active. It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
@deepseek-ai/dsh-escalation-tolerance
Tolerate redundant sandbox_permissions requests – a Cordis plugin that turns hard failures into harmless no‑ops when a tool asks for a permission mode that is already active.
Problem
Some GPT‑family models (e.g., gpt-5.6-luna, azure/gpt-5.4-mini) speculatively send sandbox_permissions on ordinary tool calls, even when the session already runs at that permission level. The shared escalation validator (@deepseek-ai/dsh-sandbox) expects any escalation request to be strictly wider than the call’s effective mode; otherwise it fails with:
sandbox escalation to "<mode>" is not strictly wider than this call's current "<mode>" mode
This means a trivial pwd can crash the tool if the model adds a redundant sandbox_permissions field.
Solution
This plugin hooks into the tools/execute waterfall and inspects the requested sandbox_permissions. If the requested mode is not strictly wider than the session's standing mode, it strips both sandbox_permissions and justification from the arguments. The tool then executes at the standing mode – exactly what would have happened had the model not sent the redundant request.
Genuine escalations (modes that are strictly wider) are left untouched and still go through the normal approval flow.
Security note: No security boundary is changed. Stripping the redundant request is equivalent to ignoring it; the tool always runs under the session's current effective mode.
Installation
npm install @deepseek-ai/dsh-escalation-tolerance
The package includes a Cordis patch (cordis.patch.yml) that registers the plugin automatically when bundled with the @deepseek-ai/cordis bundle system.
If you are using Cordis manually, add the plugin to your configuration:
import { App } from '@deepseek-ai/cordis';
import * as escalationTolerance from '@deepseek-ai/dsh-escalation-tolerance';
const app = new App();
app.plugin(escalationTolerance);
How It Works
The plugin listens on the tools/execute event and:
Extracts
sandbox_permissionsfrom the tool call arguments.Resolves the session’s effective sandbox mode using the
sandboxPolicyservice.Compares the requested mode against the
WIDER_MODEStable:Current mode Allowed wider modes read-onlyworkspace-write,danger-full-accessworkspace-writedanger-full-accessIf the requested mode is not in that list, the plugin:
- Copies the arguments,
- Deletes
sandbox_permissionsandjustification, - Replaces
exec.argumentswith the sanitised copy, - Lets the tool execute normally.
If the requested mode is in the list, the plugin does nothing – the escalation request proceeds through the usual approval flow.
If no sandbox policy is available (or resolution fails), the plugin silently bypasses and lets the call proceed.
Dependencies
@deepseek-ai/cordis(peer dependency,^4.0.1)- The
sandboxPolicyservice (provided by@deepseek-ai/dsh-sandboxor a compatible implementation)
License
MIT
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-escalation-tolerance for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
Web profile:
dsh plugin --profile web add github:ericleoo/dsh-escalation-tolerance Headless (CLI) profile:
dsh plugin --profile headless add github:ericleoo/dsh-escalation-tolerance Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.