dsh-subprocess-inherit-environment
Run the following command in DeepSeek Harness:
dsh plugin install zhangzujian/dsh-subprocess-inherit-environment
Paste the following prompt into your AI chat to install this plugin:
Run the dsh plugin install command to clone the repository at https://github.com/zhangzujian/dsh-subprocess-inherit-environment into a local directory and add it to your DSH profile, enabling environment inheritance for child subprocesses.
About this plugin
By default, DeepSeek Harness (DSH) scrubs sensitive variables from child process environments: any entry whose name contains KEY, PASSWORD, SECRET, or TOKEN, along with DSH_* prefixed names, is removed before the subprocess starts. This credential isolation protects most workloads, yet it also blocks tools that legitimately depend on the full parent environment, such as certain MCP servers, package installers, or CLI utilities.
The dsh-subprocess-inherit-environment plugin wraps the three ctx.subprocess operations (resolveExecutable, spawn, spawnTerminal) and injects a complete copy of the current process.env as an explicit environment layer on every call. Caller-supplied entries are merged after a fresh spread of process.env each time, preserving the original semantics of explicit overrides and undefined tombstones without mutating the caller object. Upon disposal the plugin restores the original method descriptors, so any later wrapper still delegates correctly to the native DSH implementation.
This plugin is well suited for developers and researchers running trusted, single-user environments where CLI tools, MCP servers, or installer scripts need access to the full parent environment. A critical caveat: once loaded, any child process spawned through ctx.subprocess can read API keys, tokens, passwords, and other secrets. In shared deployments, untrusted repositories, or multi-user setups, prefer an exact variable allowlist or a dedicated isolation mechanism instead of forwarding the entire environment.
Use Cases
- MCP servers or CLI tools that require the full parent API keys and proxy config
- Local package installers that depend on parent proxy credentials to execute
- Solo developer debugging where child scripts need every environment variable
Best For
- Developers running DSH in a trusted single-user deployment
- Engineers whose MCP servers or tooling need full subprocess environment access
- Contributors verifying environment passthrough in sandboxed DSH instances
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.