
lynx-gt/dsh-subagent-cwd
30Last commit Aug 15, 2026
dsh-subagent-cwd DSH plugin
This plugin extends dsh-subagent-tools with a per-call `cwd` parameter, enabling subagents to work in specific directories. It includes two small provider patches that make the `cwd` parameter actually work in both foreground and background subagent paths. Additionally, it provides persona and preset coexistence improvements.
How to install the dsh-subagent-cwd DSH plugin
dsh plugin --profile web add dsh-subagent-cwdCopying does not run this command. Review the repository and version before installing the dsh-subagent-cwd DSH plugin.
dsh-subagent-cwd DSH plugin data source
dsh-subagent-cwd DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-subagent-cwd DSH plugin can do
- Per-call cwd parameter for subagent calls
- Per-call model/provider/persona/toolFilter overrides (inherited from dsh-subagent-tools)
- Support for @preset: references and provider/model composite ids
- Patches for foreground and background subagent paths to forward cwd
- Patch v2 for persona × preset coexistence (Windows)
- Works with both headless and web profiles (web needs preset adapter)
Where the dsh-subagent-cwd DSH plugin fits
- Run a subagent in a scratch directory without context injection
- Isolate subagent file operations to a specific project folder
- Use different working directories for different subagent calls in the same session
- Combine per-call cwd with persona and preset overrides for complex workflows
Who the dsh-subagent-cwd DSH plugin is for
- Developers using DeepSeek Harness who need fine-grained subagent control
- Users who want to run subagents in isolated directories for file manipulation
dsh-subagent-cwd DSH plugin limitations
- Patches target dsh 0.1.0-rc.6 only; a dsh upgrade may invalidate them until re-run
- @preset: depends on local preset layout
- Web sessions require the preset adapter (install-preset script)
- Persona parameter is lost under router-style presets even with patch v2
- The preset adapter for POSIX (install-preset.sh) is not yet implemented for the patch v2 hunks (only Windows)
dsh-subagent-cwd DSH plugin: from the repository README
Quoted from the lynx-gt/dsh-subagent-cwd README, the upstream source of the dsh-subagent-cwd DSH plugin. Copyright remains with the original authors.
Enhanced subagent delegation tools for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) **with per-call working-directory control**. Everything in [dsh-subagent-tools](https://github.com/lynx-gt/dsh-subagent-tools) (per-call model / provider / persona / toolFilter overrides, `@preset:` references, `provider/model` composite ids) **plus** a per-call `cwd` parameter — shipped with the two small provider patches that make `cwd` actually work. | [English](README.md) | [中文](README.zh.md) | [](https://awesome-dsh-plugin.com) ## Choose one of the two packages — not both | Package | Per-call model/provider/persona/toolFilter | `@preset:` | `cwd` | Patches | |---|---|---|---|---| | **dsh-subagent-tools** | ✅ | ✅ | ❌ | **none (bundle only)** | | **dsh-subagent-cwd** (this) | ✅ | ✅ | ✅ | 2 provider patches | Install **either** one. Both expose the same tool surface (`subagent` / `subagent_fork`) and colliding installations would fight over the tool names. ## Why cwd needs patches (and the other features don't) `SubagentStartRequest` has **no cwd field**, and the in-process drive layer builds chil
Read the full READMERepository license: MIT
dsh-subagent-cwd DSH plugin questions
How do I install dsh-subagent-cwd?
Run `dsh plugin --profile web add dsh-subagent-cwd` and then apply the patches with `powershell -ExecutionPolicy Bypass -File patches\install.ps1` (Windows) or `./patches/install.sh` (POSIX). For web sessions, also run the preset adapter. Restart dsh and start a new session.
Why does the cwd parameter need patches?
Because SubagentStartRequest has no cwd field, and the in-process drive layer does not forward per-call cwd. Two code paths (foreground and background) must be patched to honor cwd. This package ships the required patches.
Can I use dsh-subagent-cwd with dsh-subagent-tools?
No, choose one of the two packages. Both expose the same tool surface (subagent/subagent_fork) and colliding installations would fight over tool names. dsh-subagent-cwd includes all features of dsh-subagent-tools plus cwd.
What happens when I upgrade dsh?
A dsh upgrade rewrites node_modules and wipes both patches. You must re-run the installer script (idempotent) after each upgrade. The bundle itself survives in the profile's node_modules, but peerDependencies may refuse to load if public API changes.
Does the persona parameter work with router-style presets?
No, even with patch v2, the per-call persona is lost under router-style presets because their system-prompt/assemble hook deletes persona sections. Workarounds include using a non-router-style preset, injecting role through message layer, or accepting that persona is a no-op.