Preface

DeepSeek Harness (abbreviated as DSH) is an open-source agent runtime developed by DeepSeek, whose core philosophy is Everything is a Plugin: models, tools, sandboxes, sessions, and interfaces can all be replaced or reorganized. There is an independent community plugin directory (deepseek-harness-plugin.com) for retrieving and installing third-party plugins; this is not an official app store for DeepSeek / HyperGAI, and you need to verify the source code and licenses for the included projects on your own.

The built-in “Minimal Mode” has a very narrow tool surface: fixed persona, only exposes bash and str_replace_editor, and does not perform context compression. Many developers use it to align model behavior. The problem is that this preset often fails to start directly on Windows. The failures usually have two layers:
1. Persistent bash relies on PTY, and @deepseek-ai/dsh-subprocess-local will reject terminal detection on win32, with an error similar to terminal inspection is unsupported on platform win32, which has nothing to do with whether bash is installed on the machine;
2. Even if PTY is bypassed, @deepseek-ai/dsh-bash-local looks for an executable named bash in the PATH, which is not provided by Windows by default.

dsh-gitbash-preset is an agent preset plugin developed specifically for this issue. It does not modify the DSH core, but installs a variant of “Minimal Mode (Git Bash)”: the persona and editor tools remain unchanged, and the bash call is changed to use Git for Windows’ MSYS shell, replacing the persistent PTY session with a one-time bash -c call each time.

This article is organized based on the plugin directory page, the GitHub repository README/source code, the npm package description, and cross-verified with the official DeepSeek Harness repository. The current version of the repository is 0.1.2 (consistent between package.json and npm), and GitHub shows 121 stars as of 2026-08-17; the directory page marked 53 stars when it was included, so refer to the repository page for the accurate count.

What is This

dsh-gitbash-preset is a “Tools and Capabilities” type DSH plugin, maintained by liceses on GitHub, licensed under MIT. The npm package name is @icelily/dsh-gitbash-preset, and the author field in package.json and the LICENSE copyright statement are both icelily. It requires Node.js >= 20.

What it does can be summarized in one sentence: it maps the bash tool in the official Minimal Mode to the local Git for Windows’ bash.exe, allowing Windows users to select “Minimal Mode (Git Bash)” in the web interface and actually execute commands.

The preset ID is minimal-gitbash. When the plugin starts, it copies the packaged preset files to the user’s preset root directory:

${DSH_HOME:-~/.dsh}/.agent-presets/minimal-gitbash/

The copied files include agent.cordis.yml, gitbash-executor.mjs, and preset.yml. The display name in the interface is “Minimal Mode (Git Bash)”, and the order field in preset.yml is 6.

It is necessary to clarify the boundary first: this plugin does not provide a PTY backend for win32. There are other community solutions that use persistent Git Bash / replace the subprocess runtime; this plugin is designed to open a new shell for each call, and does not retain the previous cd or export state. The README clearly states that the official persistent PTY is unavailable on Windows, and this is an alternative solution, not a full复刻 of the original Minimal Mode.

Core Features

The capabilities that match between the repository README and the source code are mainly as follows:

  1. Idempotent Preset Installation
    The plugin line inserts the web profile via cordis.patch.yml. At startup, it checks whether all three preset files exist in the target directory: if they all exist and force: true is not set, it only logs and skips the installation; if the file contents do not match the packaged version, the log will prompt to use force: true to overwrite. Setting force: true will overwrite these three files with the packaged versions, but any additional files added by the user later will be retained.

  2. Automatic Git Bash Detection
    gitbash-executor.mjs looks for the shell in the following order on Windows (explicitly configured shellPath takes priority):

    • Environment variable GIT_BASH
    • %ProgramFiles%\Git\bin\bash.exe
    • %ProgramFiles(x86)%\Git\bin\bash.exe
    • %LOCALAPPDATA%\Programs\Git\bin\bash.exe
    • bash.exe in the PATH
    • If none are found, fall back to the bare command name bash, leaving the parsing failure to be handled by the subsequent spawn error

    The PATH scan will skip the System32 / Sysnative / SysWOW64 directories. The bash.exe commonly found in these locations is the WSL launcher, not Git Bash; issue #1 in the repository recorded that when Git is installed in a non-standard path, the detection might mistakenly hit C:\Windows\System32\bash.exe, and if no WSL distribution is installed, it will report “No installed distributions”. The maintainer added this filtering in a subsequent commit. On non-Windows platforms, bash is used directly if no path is explicitly specified; the gitbash-shell group in the preset also has disabled: !!js process.platform !== 'win32', meaning this shell group is disabled by default on non-Windows systems.

    In addition, the executor will convert MSYS-style drive letter paths (such as /d/foo) to D:\foo to avoid mismatches when passing the working directory to Node’s child_process. Root paths such as /usr/bin will not be mistakenly converted to drive letters.

  3. Sandbox-Aware Gating, No Bypassing Security Boundaries
    Initializing the MSYS runtime in a Windows restricted token sandbox will fail (unable to create a signal pipe). Therefore, run / start will only allow execution when the policy is danger-full-access, or when the deployment has no sandbox policy at all; workspace-write or more restrictive modes will throw an error, prompting the user to use sandbox_permissions: "danger-full-access" with a justification for a one-time upgrade, or switch the session to full access. This is a gating mechanism, not a way to turn off the sandbox.

  4. Minimal Tool Surface Remains Unchanged
    The persona text in agent.cordis.yml is You are a helpful software engineer assistant., with complete: true and includeRuntimeContext: false, meaning the system prompt ends here, and subsequent assembly listeners will not append additional identity descriptions. The model side still uses bash + str_replace_editor, with no context compression. The enableRunInBackground field of tool-bash is set to false.

    During execution, it runs [shellPath, '-c', command] via the host’s subprocess service, and handles timeouts, output truncation (spill files for overflow writes), and termination grace periods. The environment will override NO_COLOR=1, TERM=dumb, PAGER=cat, and GIT_PAGER=cat to reduce interference from pagers and color output.

Installation and Activation

The installation command given on the directory page is as follows, executed in the DeepSeek Harness terminal:

dsh plugin add github:liceses/dsh-gitbash-preset

For reproducible installations, the directory page recommends pinning the commit hash:

dsh plugin add github:liceses/dsh-gitbash-preset#<commit>

The repository README, cordis.patch.yml comments, and the npm page list another command, targeting the web profile and using the published package name:

dsh plugin --profile web add @icelily/dsh-gitbash-preset

Do not mix up the two commands. github:liceses/dsh-gitbash-preset is the GitHub specification on the directory page; @icelily/dsh-gitbash-preset is the npm package name, currently at version 0.1.2. The DSH official documentation states: installing from GitHub pulls the source code, while installing from npm gets the published artifacts. This plugin already includes the lib/ directory in its package, so the latter command is closer to the activation method provided by the author. Replace web with the actual profile name you are using, which may not be web.

You can also install without using the plugin: directly copy the agent-presets/minimal-gitbash/ folder from the repository to ~/.dsh/.agent-presets/. Alternatively, manually merge cordis.patch.yml into your profile’s patch layer.

Restart DSH for changes to take effect. After restarting, the plugin will attempt to install the preset; if the target already exists, it will be a no-op and will not overwrite your modified version unless you set force to true in the plugin configuration.

Please check the source repository and license before installing. The plugin runs with the permissions of the current dsh process, and may execute code during installation, which is outside the agent sandbox.

Typical Usage

Prerequisite: Git for Windows is installed locally, and bash.exe can be found via the detection chain mentioned above. If Git is installed in a custom directory, you can set the GIT_BASH environment variable, or hardcode shellPath in the preset configuration.

  1. After restarting DSH, open the web interface and create a new session (existing sessions will not automatically switch to this preset).
  2. Select Minimal Mode (Git Bash) from the preset list.
  3. There are two ways to enable bash, as listed in the README (choose one):
    • Switch the session sandbox to Full Access, and subsequent bash calls will go directly through Git Bash;
    • Keep workspace-write permissions, and let the model fail on the first call, then follow the error prompt to use sandbox_permissions: "danger-full-access" with a justification for a one-time upgrade, which will go through normal approval.
  4. If Git is not installed in the default path, you can explicitly specify it in the gitbash-executor configuration in agent-presets/minimal-gitbash/agent.cordis.yml:
    shellPath: 'C:\\Program Files\\Git\\bin\\bash.exe'
The following adjustable executor parameters are included in the preset (all from the README / `agent.cordis.yml`):
| Field | Default | Description |
| --- | --- | --- |
| `shellPath` | Auto-detected | Takes priority when non-empty |
| `timeoutMs` | 120000 | Default timeout for a single command |
| `maxTimeoutMs` | 600000 | Maximum timeout limit |
| `maxOutputBytes` | 64000 | Bytes retained per stream, overflow writes to spill file |
| `graceMs` | 3000 | Grace period between SIGTERM and SIGKILL when terminating a process |

The plugin itself only has one common switch `force`, which defaults to `false`.

The self-test commands provided by the repository are:
    npm run check   # Syntax check: plugin entry, executor, test files
    npm run test    # Unit tests: path conversion / detection priority / configuration validation, 10 test cases

Applicable Scenarios and Notes

Who this is for: Windows users using the DSH web interface who want to retain the narrow tool surface of Minimal Mode, and who already have (or can install) Git for Windows locally. This is not suitable for workflows that expect “retaining cwd and environment variables across calls” — that is the capability of persistent PTY, which this preset explicitly does not provide.

Please note the following points when using:
1. The sandbox will not be relaxed by the plugin. Git Bash cannot start when using workspace-write or more restrictive permissions, which is a limitation of MSYS and Windows restricted tokens. You need full access or a one-time upgrade to execute commands; bash being unavailable in read-only sessions is expected behavior.
2. Each call uses a new shell. Do not assume that the cd from the previous command is still active. When you need a fixed working directory, use an absolute path in the command, or pass it via the executor’s cwd / workdir in the request (MSYS drive letter paths will be converted to Windows paths).
3. Do not use the WSL bash.exe from System32 as a substitute for Git Bash. The current version skips these directories; if detection still lands on the wrong binary, using GIT_BASH or shellPath to lock down the Git installation path is more reliable.
4. This is a community plugin. The directory site has no affiliation with DeepSeek’s official repository. Read the GitHub repository and the MIT license before installing, and confirm that you trust the code that will run with dsh process permissions. Pin the commit or npm version number for reproducible environments.
5. This is not the same as plugins that add persistent PTY support for Windows. If your goal is to retain variables and current directory between two bash calls, you need to look at other Windows runtime solutions; this plugin solves the problem of “narrow tool surface + being able to run commands in Git Bash on Windows”.

Summary

dsh-gitbash-preset keeps the official Minimal Mode’s persona and str_replace_editor unchanged, replaces the persistent bash that fails the win32 PTY check with bash -c on Git for Windows, and adds sandbox gating and automatic path detection. For users who just want to use the narrow tool surface for coding on Windows, after installation, restarting, selecting “Minimal Mode (Git Bash)”, and switching the sandbox to full access, you can start using it immediately.

Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-gitbash-preset/

GitHub: https://github.com/liceses/dsh-gitbash-preset

npm: https://www.npmjs.com/package/@icelily/dsh-gitbash-preset