Skip to content

sjh9714/dsh-win32

31Last commit Aug 16, 2026

dsh-win32 DSH plugin

dsh-win32 fixes multiple Windows-specific issues in DSH, including terminal inspection errors, sandboxed Git Bash failures, foreground command detection, and read-only mode bypass. It provides two presets – one with busybox ash for sandboxed mode and one with Git Bash for full-access mode – along with a doctor command to diagnose common problems.

How to install the dsh-win32 DSH plugin

dsh plugin --profile web add dsh-win32

Copying does not run this command. Review the repository and version before installing the dsh-win32 DSH plugin.

dsh-win32 DSH plugin data source

dsh-win32 DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-win32 DSH plugin can do

  • Provides a persistent shell in sandboxed mode using busybox-w32 ash, which is unique among Windows DSH solutions.
  • Fixes the 'terminal inspection is unsupported on platform win32' error by implementing a Windows-native process inspector via CIM and taskkill.
  • Adds a write-fenced filesystem backend for both read-only and workspace-write modes, preventing unauthorized writes while preserving encoding support.
  • Supports GBK/UTF-16 file reading with automatic sniffing and decoding, circumventing the upstream `FS_NOT_TEXT` rejection.
  • Includes a `doctor` command that checks for known issues (koffi broken builds, PowerShell 7 missing, WSL fake bash, etc.) and outputs machine-readable JSON.

Where the dsh-win32 DSH plugin fits

  • Run a DSH agent on Windows in a sandboxed environment with a persistent shell for debugging and coding tasks.
  • Use the minimal preset with workspace-write permissions to safely edit files while keeping the agent within workspace boundaries.
  • Migrate from Claude Code to DSH on Windows and use dsh-movein alongside this plugin for a smooth transition.
  • Diagnose and fix common DSH-on-Windows setup issues with `npx dsh-win32 doctor` and `npx dsh-win32 fix`.
  • Edit legacy projects with GBK or UTF-16 encoded files that the official DSH would refuse to read.

Who the dsh-win32 DSH plugin is for

  • Windows users who want to run DSH agents with full functionality (minimal mode, persistent shell, sandbox).
  • Developers working on Windows who need to use DSH for coding, debugging, and automation tasks.

dsh-win32 DSH plugin limitations

  • Git Bash preset requires `danger-full-access`; sandboxed mode must use the busybox variant, which provides ash instead of bash (no arrays, no `[[ ]]`).
  • Editing legacy encoded files saves them as UTF-8 without round-tripping the original encoding.
  • PTY output in legacy code pages cannot be decoded at the plugin level; node-pty decodes as UTF-8 before DSH code runs.
  • `foregroundPgid` only returns the latest attached process; for pipelines, only the newest segment gets targeted by SIGTERM/SIGKILL.
  • `isStdinWaiting` is always false because Windows lacks reliable stdin-read-block detection.
  • Based on DSH 0.1.0-rc.6; rapid updates required for newer rc versions.

dsh-win32 DSH plugin: from the repository README

Quoted from the sjh9714/dsh-win32 README, the upstream source of the dsh-win32 DSH plugin. Copyright remains with the original authors.

**在 Windows 上把 DSH 用起来。极简模式、持久 shell、沙箱,全部可用。** [English](./README.en.md) <p> <a href="https://www.npmjs.com/package/dsh-win32"><img src="https://img.shields.io/npm/v/dsh-win32?style=flat-square&label=npm&color=cb3837" alt="npm"></a> <a href="https://github.com/sjh9714/dsh-win32/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/sjh9714/dsh-win32/ci.yml?style=flat-square&label=CI" alt="CI"></a> <a href="https://github.com/sjh9714/dsh-win32/stargazers"><img src="https://img.shields.io/github/stars/sjh9714/dsh-win32?style=flat-square" alt="stars"></a> <img src="https://img.shields.io/badge/platform-win32-0078D4?style=flat-square" alt="win32"> <img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT"> </p> ![沙箱内跑完一整轮真实的修 bug](./assets/shot-persistent-sandboxed.png) 真机截图。沙箱模式(`Workspace Write`)下,Agent 跑测试看到失败、读源码定位、改掉、再跑一次拿到 `all tests passed`。 ## 三步装好 ```powershell npx dsh-win32 setup --sandboxed ``` 需要 [Git for Windows](https://git-scm.com)(`winget install Git.Git`)。装完启动 `npx @deepseek-ai/dsh web`,然后。 1. 左侧 `Workspaces` 那行点文件夹图标,**先加一个工作区**。不加的话输入框是灰的,打不了字 2. 预设选择器里选 **Minimal (Windows, sandboxed)** 3. 权限徽章保持 *

Read the full READMERepository license: MIT

dsh-win32 DSH plugin questions

How do I install dsh-win32 on Windows?

The easiest way is to run `npx dsh-win32 setup --sandboxed` in PowerShell. This installs the bundle, the sandboxed preset, and runs a health check. You need Git for Windows (install with `winget install Git.Git`). After setup, start DSH with `npx @deepseek-ai/dsh web`, add a workspace, select the 'Minimal (Windows, sandboxed)' preset, and keep the permission badge set to 'Workspace Write'.

Why does DSH show 'terminal inspection is unsupported on platform win32'?

This error happens because the official DSH subprocess runtime has a missing Win32 implementation for `createProcessInspector`. dsh-win32 fixes this by providing a Windows-native process inspector using CIM (WMI) for process tree enumeration and taskkill for signals. The fix is embedded in the plugin's presets, so you don't need to do anything extra after installing dsh-win32.

Can I use Git Bash in the sandboxed mode?

No. Git Bash relies on MSYS/Cygwin runtime which requires full token privileges and cannot start under the restricted token used by sandbox mode. dsh-win32 provides a special preset called 'Minimal (Windows, sandboxed)' that uses busybox-w32 ash instead, which is a pure Win32 shell that works inside the sandbox. If you need Git Bash, you must use the 'Minimal (Windows)' preset with `danger-full-access` permission.

How do I fix common issues after installing dsh-win32?

Run `npx dsh-win32 doctor` to check for known problems such as koffi 3.1.3/3.1.4 broken prebuilts, missing PowerShell 7, or WSL bash being mistaken for Git Bash. The doctor outputs a pass/warn/fail/skip status for each check. For safe automated fixes, run `npx dsh-win32 fix`. You can also use `--json` to get machine-readable output for CI or support.

Why does dsh-win32 change file encoding when editing?

dsh-win32's custom filesystem backend (`fs-confined`) reads files with automatic encoding sniffing (supporting GBK and UTF-16). However, when writing, it always saves as UTF-8. This is a design choice to normalize encoding in the agent workspace. If you need to preserve the original encoding, you should manually handle the file before the agent edits it. The plugin does not do round-trip encoding preservation.