Introduction¶
In DeepSeek Harness (DSH), escalating tools such as bash and write expose the sandbox_permissions and justification parameters. The Core only accepts permission declarations that are “the same or wider than the current mode”; if the model fills in a value narrower than the current session, the call fails before the command is actually executed, with an error like the one below:
Error: sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode
This kind of problem is common when integrating GPT-family models: they are often trained on the Codex shell tool and habitually fill in all optional fields, and since there is no “use default” option in DSH’s enumeration, the model tends to choose workspace-write. When the session is already in danger-full-access, this is equivalent to requesting an invalid “narrowing”, and the Core rejects it directly.
Below we introduce the community plugin dsh-sandbox-noop-escalation (maintainer zzstar101, category admin-security). It rewrites parameters before tool execution, removing redundant fields that would not change the sandbox width anyway, so that read-only or already-maximum-privilege calls execute normally without granting any extra permissions.
What Is This¶
dsh-sandbox-noop-escalation is a DSH plugin: in the tools/pre-execute hook, it compares the sandbox mode requested by the current call with the mode currently resolved for the session; if the request cannot widen the current mode, it removes sandbox_permissions and justification, avoiding not strictly wider-type errors.
The plugin does not expand permissions; it only removes requests that “would not change the mode even if kept”. See the GitHub repository for source code and documentation, and the community directory page at SkillHub entry. The license is MIT, and the current package version is 0.2.0.
Why “not strictly wider” Occurs¶
DSH’s escalating tools (bash, pwsh, write, edit, run_code) have a fixed enumeration ["workspace-write", "danger-full-access"] in their schemas. The Core’s rule is: the field value must be the current mode, or a strictly wider mode.
GPT models tend to include sandbox_permissions in every call (for example, even for plain read-only commands they fill in workspace-write). In a session already at danger-full-access, workspace-write is narrower than the current mode, so the entire call is rejected, and the error occurs at the pre-execute stage, regardless of whether the command itself is safe.
The Codex shell tool also uses same-named field values such as use_default, require_escalated, and with_additional_permissions; models sometimes carry these values verbatim into DSH. The plugin treats empty values and use_default uniformly as “not requested” and cleans them up; for the latter two, it only cleans them up when the session is already unrestricted, and retains them in narrower sessions for DSH to handle, avoiding unauthorized mapping to wider permissions.
Core Functionality¶
Before each monitored tool executes, the plugin processes parameters based on the relationship between the requested mode and the current mode. The behavior is as follows (consistent with the README):
| Condition of call parameters | Action |
|---|---|
| Requested mode equals or is narrower than the current mode | Remove sandbox_permissions and justification |
sandbox_permissions is null, empty, or Codex’s use_default |
Remove both fields in any mode |
Session is already in danger-full-access |
Remove both fields (no wider mode exists) |
Only justification present, no sandbox_permissions |
Remove justification |
| Requested mode is strictly wider than the current mode | No change; DSH handles approval as usual |
| Unknown requested mode, or current mode cannot be resolved | No change; DSH decides |
Implementation-wise, it only processes tools whose registered schema contains DSH’s own escalation fields, to avoid mistakenly rewriting third-party tools that reuse the same field names. The rewriting happens before execution, does not depend on matching error message text, and does not consume a failed retry.
Installation and Activation¶
You can install it from the DSH plugin marketplace, or specify a profile via the CLI:
dsh plugin --profile <name> add dsh-sandbox-noop-escalation
The package contains dsh.bundle.patch, which is mounted automatically after installation; generally no manual modification of the profile structure is needed.
The plugin runs with the permissions of the current DSH process; before installing, it is recommended to review the repository source code and the MIT license yourself to confirm it meets your security policy.
Configuration¶
Default monitored tools: bash, pwsh, write, edit, run_code. You can override this in the profile’s cordis.patch.yml:
- id: sandbox-noop-escalation
config:
tools: [bash, pwsh]
| Config item | Type | Default value | Meaning |
|---|---|---|---|
tools |
string[] |
["bash", "pwsh", "write", "edit", "run_code"] |
Tool names to monitor; an empty array disables the plugin |
Compatibility and Dependencies¶
The README states it is tested on DSH 0.2.0-rc.2 (cordis 4.0.4). The plugin depends on the tools/pre-execute hook as well as the tools and sandboxPolicy services; if either is missing, it will not load. If the policy cannot be resolved, it only cleans up empty values and use_default, passing through other parameters unchanged.
Runtime requires Node.js >= 20; the peer dependency is @deepseek-ai/cordis ^4.0.1.
Use Cases and Caveats¶
Suitable for: Using GPT or other models that habitually fill in every optional tool field with DSH; sessions that are frequently in danger-full-access or a wider sandbox yet repeatedly rejected due to redundant workspace-write; wanting to reduce meaningless escalation failures while still preserving the DSH approval flow when a “real widening” is needed.
Caveats:
- The plugin never actively widens permissions; genuinely wider requests still go through DSH’s original flow.
- Third-party tools that merely reuse the same field names with different semantics will not be rewritten by the plugin.
- Community directories such as SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer; the plugin marketplace entry and GitHub are different entry points to the same project.
Conclusion¶
If you frequently see sandbox escalation “not strictly wider” errors when using GPT-family models in DSH, you can first install dsh-sandbox-noop-escalation to let invalid sandbox_permissions / justification be removed at the pre-execute stage, and then observe whether the escalating tools return to normal.
- Directory page: https://www.skillhub.cn/plugins/zzstar101/dsh-sandbox-noop-escalation
- GitHub: https://github.com/zzstar101/dsh-sandbox-noop-escalation