Replies: 2 comments 1 reply
|
新版本修复了这个bUG 不过又引入了几个新BUG |
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
Summary
pnpm dsh web(源码启动)下,任何一次工具调用都会失败,并且会让该会话的日志永久不可用(后续每一轮请求都失败)。同一个 checkout 用产物平面启动(node apps/cli/lib/bin.js web)则一切正常。Reproduction
已确认在全新 clone + 全新依赖 + 全新构建上必现,与本地环境状态无关:
git clone https://github.com/deepseek-ai/deepseek-harness.git cd deepseek-harness pnpm install pnpm run build pnpm dsh web然后在 GUI 里发一条会用到工具的指令(例如“查看当前文件目录”)。
Current behavior
turn/end):该工具调用没有产生结果事件:整份日志
tool/call=1、tool/result=0。之后这个会话每一轮请求都失败:
DeepSeek Messages tool calls need immediate results(
packages/llm/llm-deepseek/src/protocols/messages/serialize.ts:117)An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. (insufficient tool messages following tool_calls message)即:一次工具基础设施故障会永久毁掉一个会话,只能新建会话。
Expected behavior
pnpm dsh web)与产物启动(node apps/cli/lib/bin.js web)行为一致,插件解析只使用一个模块平面;tool/call)。Environment
ddefc45fbc(0.1.6-alpha.2),源码启动pnpm dsh webpnpm run build之后node apps/cli/lib/bin.js web正常根因(供参考,附最小证据)
TOOL_RUNTIME_SCHEDULER是按模块实例生成的unique symbol(packages/core/tools/src/index.ts:463),agent-loop 用它取调度器(packages/core/agent-loop/src/tool-calls.ts:170:ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(...))。源码启动时同一个进程里存在两份
@deepseek-ai/dsh-tools:packages/core/tools/lib/index.js;paths映射到源码packages/core/tools/src/index.ts。在一个真实 profile boot(
--profile acp)里挂探针读取,结果:因此 agent-loop 查到的调度器是
undefined。这与仓库约定 “Source plane vs artifact plane, never mixed” 冲突。修复方向(本地已验证、未提交):让 profile 解析跟随启动平面——源码启动时,把解析到
lib/**/*.js的条目改投存在的src/**/*.ts(x);生成的 host 产物与浏览器/Worker 打包件没有对应源码,继续留在lib/;Worker 因为没有 tsx hook 固定产物平面。相关位置:packages/boot/app-boot/src/profile.ts、packages/boot/app-boot/src/profile-resolution/resolver.ts。另一个相关缺陷(同一条因果链的第二段)
工具组失败后,已经写入的
tool/call不会补结果(packages/core/agent-loop/src/tool-calls.ts的现有设计注释是 “without fabricating results”),于是日志永久停在“assistant 带 tool_calls 但没有结果”的状态。崩溃恢复路径(packages/core/session/src/repair.ts的interruptedTurnClosers)已经有同类语义(TOOL_OUTCOME_UNKNOWN),建议实时失败路径也补一条结果,避免一次故障毁掉会话。Body (English)
Summary
With a source launch (
pnpm dsh web), every tool call fails, and the failure permanently breaks the session: all later requests in it fail too. The same checkout launched from built artifacts (node apps/cli/lib/bin.js web) works.Reproduction
Reproduced on a fresh clone + fresh install + fresh build:
git clone https://github.com/deepseek-ai/deepseek-harness.git cd deepseek-harness pnpm install pnpm run build pnpm dsh webThen send any prompt that uses a tool (for example “list the current directory”).
Current behavior
turn/endin the session log):The call has no result event: the log contains
tool/call=1,tool/result=0.Every later request in that session then fails:
DeepSeek Messages tool calls need immediate results(
packages/llm/llm-deepseek/src/protocols/messages/serialize.ts:117)An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'.Expected behavior
tool/callwithout a result).Environment
ddefc45fbc(0.1.6-alpha.2), source launchpnpm dsh webnode apps/cli/lib/bin.js webafterpnpm run buildworksRoot cause (with minimal evidence)
TOOL_RUNTIME_SCHEDULERis aunique symbolcreated per module instance (packages/core/tools/src/index.ts:463), and the agent loop reads the scheduler through it (packages/core/agent-loop/src/tool-calls.ts:170:ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(...)).A source launch loads two copies of
@deepseek-ai/dsh-toolsin one process:packages/core/tools/lib/index.js;pathsto the source filepackages/core/tools/src/index.ts.A probe mounted in a real profile boot (
--profile acp) reads:So the scheduler lookup in the agent loop is
undefined, contradicting the repository rule “Source plane vs artifact plane, never mixed”.Fix direction (verified locally, uncommitted): make profile resolution follow the launch plane — under a source launch, a routed entry that resolves into
lib/**/*.jsmoves to the matchingsrc/**/*.ts(x)when it exists (generated host artifacts and bundled browser/Worker payloads keep the artifact); Workers stay on the artifact plane because they have no tsx hook. Files:packages/boot/app-boot/src/profile.ts,packages/boot/app-boot/src/profile-resolution/resolver.ts.Related second defect
When a tool group fails, already-written
tool/callevents receive no result (packages/core/agent-loop/src/tool-calls.tsdocuments “without fabricating results”), leaving the log permanently in an “assistant with tool_calls and no results” state. Crash repair already models this case (packages/core/session/src/repair.ts,TOOL_OUTCOME_UNKNOWN); the live failure path should record the same kind of result so one failure cannot destroy a session.All reactions