Jyleaves/dsh-win-bash-fix ↗★ 0
@jyleaves/dsh-win-bash-fix
Windows Git Bash fix for DeepSeek Harness (dsh): MSYS sandbox conflict + terminal inspector, plus the minimal-win collective-thinking preset (we/let's reasoning chain).
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Jyleaves/dsh-win-bash-fix说明文档
阅读完整 README ↗dsh-win-bash-fix
让 DeepSeek Harness (dsh) 在 Windows 上的 Git Bash 真正可用,并附带一个稳定的"健康思维链"预设 minimal-win。
- 修复:Windows 上 bash 工具 100% 启动失败的问题(
PTY shell exited during startup/terminal inspection is unsupported on platform win32) - 预设:双工具(bash + str_replace_editor)编码 Agent,persona 强制英文集体思维——思维链稳定为
we / let's,实测let me归零 - 升级不丢:纯运行时补丁(cordis 插件),不修改 dsh 安装文件
Overview
解决什么问题:DeepSeek Harness 在 Windows 上使用 bash 工具(官方 minimal 预设等)时,bash 每次调用都失败:
| 症状 | 报错 |
|---|---|
| bash 每次调用即失败 | Error: PTY shell exited during startup |
| 终端创建被拒绝 | subprocess-local: terminal inspection is unsupported on platform win32 |
模型被迫绕路、反复重试,思维链大量 let me(社区俗称"降智") | — |
适合谁:在 Windows 上使用 dsh、且希望 bash 工具真正可用、思维链保持健康(we / let's)的用户。
根因(三层,全部在 Windows 上)
- 进程检查器未实现 win32:
dsh-subprocess-local的createProcessInspector()只实现 Linux/macOS,win32 直接throw——每次 spawn 终端都炸。 - MSYS 环境缺失:node-pty 直接拉起 Git Bash 时没有
MSYSTEM/CHERE_INVOKING/MSYS2_PATH_TYPE等环境变量,bash 无法以交互模式启动。 - 🔑 核心根因——沙箱与 MSYS 冲突:dsh 的 Windows 文件沙箱(
dsh-sandbox-windows-acl)用 restricted token(受限令牌) 包一层再执行命令;而 MSYS2 运行时需要创建带用户 SID 的共享内存映射(CreateFileMapping),被受限令牌拒绝(Win32 error 5 (ACCESS DENIED))→ bash 启动即崩溃。
为什么"思维链 let me"之前被认为是玄学
社区把 let me 视为"降智"标记,但真正的原因是:bash 工具在 Windows 上从未成功执行过。模型每次调用 bash 都失败 → 反复重试 → 挣扎语言("Let me retry…")刷屏。工具恢复正常后,同一模型同一任务的思维链自动回到健康的 we / let's 集体思维。
Compatibility
- DSH 版本:在
0.1.0-rc.6(npm 最新)上开发并验证(2026-08-15) - 平台:仅 Windows(win32);Linux/macOS 上插件自动 no-op
- 依赖:Git for Windows(默认
C:/Program Files/Git,可用GIT_ROOT环境变量覆盖)