Repository navigation
[Windows] pwsh 工具报 "PTY shell exited during startup" 后该会话永久报废——环境修复也不会自愈 #12456
Jiang-XiaoYa
started this conversation in
General
Replies: 2 comments 1 reply
0 replies
更根本的原因:极简模式设置 → 内置插件 中, 即:极简组合下,Windows 唯一的 PTY 后端( 但按文档,缺少后端时首调应报 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
摘要
pwsh工具在某会话中一旦出现PTY shell exited during startup,该会话此后所有调用都会失败,即使把导致首次失败的环境问题完全修好也不会恢复。换一个新会话
立刻正常。
环境修复(安装 pwsh、重装 DSH、更换 PowerShell 安装形态)全程无效,只有
新会话或改变审批策略才会恢复。判断为 owner-scoped 持久 shell 把「创建失败」
的结果缓存住了。
同类现象已有至少 3 份报告,见文末。
环境
C:\Program Files\PowerShell\7\pwsh.exe,真实目录E:\Deep Seek\现象
调用
pwsh工具,无论命令内容为何(echo ok、1+1、$PSVersionTable全部一样):Error: PTY shell exited during startup
.dsh\logs无任何新增记录;错误未携带 exit code / stderr。决定性证据:故障与会话绑定,与宿主机无关
同一台机器、同一个 DSH 进程、同一个 pwsh:
pwsh工具PTY shell exited during startup01..5 | %{ $_ * 2 }2,4,6,8,107.6.9→ 故障不随环境变化,只随会话变化。
时间线(说明为什么环境修复无效)
pwsh时,机器上确实没有 pwsh(PowerShell 7 非系统自带)PTY shell exited during startuppwsh -NoProfile -Command "echo msi-ok"→ 正常Modules目录 14 个模块 → 完整推断的根因
@deepseek-ai/dsh-tool-pwsh-persistent为每个 agent 会话维护一个 owner-scoped持久 shell。若该 shell 的首次创建失败,失败状态被留在 owner cache 中,后续调用
不会重新创建,因此该会话被永久锁死。
这与观察到的三点一致:
相关代码(
app.asar,dsh-tool-pwsh-persistent):All reactions