Replies: 1 comment
|
I turned this reproduction into a source-backed operator runbook: https://sandbaseai.github.io/deepseek-harness-handbook/workspace-moved-spawn-enoent.html The key diagnostic distinction is useful: One safety refinement to the immediate workaround: recreating the old path as an empty directory is a good The guide links each claim to the pinned rc.7 source and includes a minimal incident evidence template. Thanks for the precise reproduction. |
Uh oh!
There was an error while loading. Please reload this page.
环境
@deepseek-ai/dsh0.1.0-rc.6(dsh web,macOS,Node 24.15)~/dev/github/plugin复现步骤
dsh web(进程 cwd 所在目录)—— 我的操作:
~/dev/github/plugin/dsh-bloom-theme→~/dev/github/theme/dsh-bloom-theme根因(已确认,非假设)
会话 workspace 目录被移动/删除后,bash 等工具以 workspace 为默认 cwd 派生子进程,
cwd 不存在时 spawn 报
spawn bash ENOENT—— 错误指向子进程名,极具误导性(bash 明明在 /bin/bash 好好的)。grep/glob 依赖的 ripgrep 同理。
决定性证据:重建 workspace 目录(在原路径放一个占位文件)后,未重启任何进程,
bash 工具下一次调用立即恢复。此前重启 dsh web 守护进程(launchctl bootout +
bootstrap)无效 —— 说明坏的是会话绑定的 workspace 路径,不是服务进程自身的 cwd。
Workaround(立刻可用)
无需重启会话,下一次工具调用即恢复。
为什么这个问题对用户高频
开发中随手整理目录结构(mv / 重命名项目文件夹)是很常见的操作,而 DSH 会话
往往一开就是几个小时。只要会话进程的 cwd 在被移动的目录树里,整个会话的
执行层就悄悄瘫痪,且报错完全看不出与目录移动有关(用户会以为 bash/环境坏了)。
建议
os.homedir()或os.tmpdir(),而不是让子进程继承一个已失效的 cwdprocess.cwd()是否还挂载,给出可操作的报错,如「会话工作目录已被移动,请重启会话或……」
补充
echo成功后随即全部失败(可能是移动完成过程中的竞态窗口)All reactions