Skip to main content
G

dsh-known-issues

gv-megumi/dsh-known-issues

Workarounds for known DeepSeek Harness tool-argument issues, each with its own switch in Settings: drops sandbox_permissions and justification when the request does not widen the session mode (bash, pwsh, write, edit, apply_patch, run_code), and treats empty provider, model and reasoning_effort on the subagent tools as omitted.

Install

dsh plugin --profile web add github:gv-megumi/dsh-known-issues

README

dsh-known-issues

English | 中文

CI License: MIT DSH

Workarounds for known DeepSeek Harness (DSH) issues, each with its own switch in DSH Settings.

Models sometimes fill optional tool arguments in ways DSH's strict validation rejects, even though the intent is clear. This plugin normalizes those cases before DSH judges the call. It never relaxes a check: a genuinely invalid call still fails exactly as it would without the plugin.

Fixes

FixSwitch in SettingsDefaultSymptom it removes
Subagent route arguments子智能体路由参数 / subagentRouteArgsonError: child LLM \provider` must be non-empty`
Redundant sandbox escalation多余的沙箱提权请求 / sandboxEscalationonError: sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode

1. Subagent route arguments

The subagent, subagent_fork and list_subagent_models tools declare provider, model and reasoning_effort as optional — omitting them means "inherit the default route". Many models still send "provider": "" (or a whitespace string) to say "no value here", and the strict 0.2.2 validation rejects that as invalid.

InputAfter the fixResult
provider:"", model:"", reasoning_effort:""all three removeddefault route, no error
same three empty fields on subagent_forkall three removedfork runs on the default route
provider:"", model:"gpt-6-astra"model:"gpt-6-astra"upstream `model` requires `provider` — strictness kept
provider:"codex", model:"gpt-6-astra", effort:""effort removedreal route still passes the allow-list check
any other tool, or non-object argumentsunchangedunchanged

Unknown routes, disabled model selection and incomplete provider/model pairs still fail exactly as upstream. Empty strings in other fields are never touched — write with content: "" still means "empty file".

2. Redundant sandbox escalation

Every sandboxed tool (bash, pwsh, write, edit, apply_patch) and the run_code program tool accept sandbox_permissions + justification to ask for a wider sandbox than the session currently has. Models often attach them to every call "to be safe". DSH lets a request for the session's current mode through silently, but a request that is not strictly wider than the current mode is rejected, so on a full-access session the call fails before it runs:

Error: sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode

The fix removes the two fields whenever they cannot widen anything. A request that really would widen the session is left for DSH, so its approval flow still applies.

Session modeModel sendsAfter the fix
danger-full-accesssandbox_permissions: "workspace-write"both fields removed, call runs
danger-full-accesssandbox_permissions: "danger-full-access"both fields removed, call runs
read-onlysandbox_permissions: "workspace-write"kept — DSH asks for approval as usual
workspace-writejustification: "…" with no sandbox_permissionsthe orphan justification is removed
anysandbox_permissions: "" or "use_default"treated as "no request", removed

The Settings tab

The plugin adds a DSH issue fixes tab to DSH Settings, one switch per fix. A switch writes the plugin's own configuration field, so the change applies live (no reload) and survives a restart. Turning a fix off leaves the plugin installed and the other fix running.

Each title carries a ! mark. Hovering the mark with the mouse shows the concrete issue that fix addresses, including the original error text.

Install

Requirements

  • DeepSeek Harness 0.2.2+ (desktop or web profile with Cordis bundle support)
  • Node.js 20+ only for running the tests; DSH ships its own runtime

1) Put the package where the profile can resolve it

Windows (PowerShell):

$Target = Join-Path $env:USERPROFILE '.dsh\custom-bundles\dsh-known-issues'
git clone https://github.com/GV-megumi/dsh-known-issues.git $Target

macOS / Linux:

git clone https://github.com/GV-megumi/dsh-known-issues.git ~/.dsh/custom-bundles/dsh-known-issues

A profile resolves bundle packages from <profile>/node_modules.

Windows (junction, no admin rights needed):

$ProfileDir = Join-Path $env:USERPROFILE '.dsh\profiles\desktop'
New-Item -ItemType Junction `
  -Path (Join-Path $ProfileDir 'node_modules\dsh-known-issues') `
  -Target $Target

macOS / Linux:

ln -s ~/.dsh/custom-bundles/dsh-known-issues \
      ~/.dsh/profiles/desktop/node_modules/dsh-known-issues

3) Register the bundle in the profile manifest

Edit <profile>/package.json so it lists the dependency and the bundle:

{
  "dependencies": {
    "dsh-known-issues": "link:/absolute/path/to/dsh-known-issues"
  },
  "dsh": {
    "profile": {
      "bundles": ["dsh-known-issues"]
    }
  }
}

Add the bundles entry next to your existing bundle names; the position does not matter. Do not paste the insert: block from cordis.patch.yml into the profile's cordis.patch.yml: the bundle patch is applied automatically, and duplicating the row id stops Settings from saving.

4) Restart DSH completely

Quit the desktop process (not only the window) and start it again — bundles load at boot.

Verify

Route fix: ask the agent to call list_subagent_models with all three fields empty (provider: "", model: "", reasoning_effort: ""). Before the fix this prints a red must be non-empty error; after it the tool returns its route list.

Escalation fix: run a tool call in a full-access session while the model sends sandbox_permissions: "workspace-write". Before the fix it fails with not strictly wider; after it the call runs normally.

Uninstall

Remove the bundle name from dsh.profile.bundles, remove the dependency from dependencies, delete the junction/symlink, then restart DSH.

How it works

  • Both fixes hook the Cordis tool pipeline in @deepseek-ai/dsh-tools/lib/pipeline.js. The route fix listens on tools/execute (the waterfall around the tool body). The escalation fix listens on tools/pre-execute, which runs before the body where the escalation request is judged.
  • DSH deep-freezes the arguments snapshot, but the execution record itself is a plain object, so the plugin swaps exec.arguments for a frozen normalized copy and then calls next().
  • The escalation fix first asks the sandboxPolicy service for the session's effective mode and checks that the tool's schema really advertises the two fields, so it never touches a tool that does not accept escalation.
  • The rewrite is skipped when nothing changes, so real arguments keep their object identity.
  • The switches are volatile config fields, so they apply without reloading the plugin and are persisted by DSH like any other plugin setting.

Compatibility

  • Tested with DSH 0.2.2-rc.2, 0.2.2-rc.3 and 0.2.2-rc.5 (desktop, Windows). It should work on any 0.2.x build that emits tools/execute and tools/pre-execute.
  • The manifest deliberately declares no engines.dsh and no peerDependencies: DSH's compatibility preflight only denies rows with unmet requirements, so leaving them out keeps the plugin loadable across 0.2.x. Adding a hard engines.dsh range would make DSH disable the plugin whenever the range stops matching.
  • The desktop build ships as a single app.asar, so patching installed files is fragile and is undone by every update. This plugin lives in your profile and survives DSH upgrades.

Troubleshooting

SymptomCheck
Error is unchanged after restartIs the bundle name in dsh.profile.bundles? Does <profile>/node_modules/dsh-known-issues exist and resolve? Is the fix's switch on in Settings → DSH issue fixes?
DSH fails to start after installRemove the bundles entry and dependency, restart, then open an issue with the startup error
Settings cannot saveWas the insert: block copied into the profile cordis.patch.yml by mistake? Remove it
The DSH issue fixes tab is missingThe plugin did not load. Check the desktop app's log for the dsh-known-issues row

Development

npm ci           # installs @deepseek-ai/schemastery (needed to import lib/index.js)
npm test         # node --test: lib and client suites
npm run lint     # node --check on both entry files

Layout:

PathPurpose
lib/index.jsplugin entry (name, Config schema, apply), both fixes
client/index.jsSettings tab (classic client bundle for the DSH module loader)
cordis.patch.ymlbundle patch that inserts the plugin row
test/index.test.jsnode:test suite with a mini tool-pipeline harness
test/client.test.jsnode:test suite for the Settings tab with a stand-in React

Contributions are welcome — see CONTRIBUTING.md.

License

MIT

Related plugins