子代理会话的流式工具调用丢失 name 与 callId,执行报 unknown tool "" #887
Unanswered
SummerXaa-Z
asked this question in
Q&A
Replies: 3 comments 1 reply
|
补充诊断: |
0 replies
|
报告者验证:#890 的四个源码定位点已在本机 rc.6 逐一核对通过——
附议方案 A:一处守卫修复同时覆盖 #885 与本报告两个触发面。另建议在 rc changelog 注明兼容网关(空串续块 delta)是该缺陷的触发前提,官方端点用户可能不触发。 |
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.
[Bug 报告,issues 未开放故发此处] 子代理(subagent spawn)写文件必失败:tool/call 事件中 name 与 callId 为空串,实际执行报
Error: unknown tool "";同一环境下主循环工具调用完全正常。三次复现均为确定性失败。复现步骤:
@deepseek-ai/dsh@0.1.0-rc.6,headless profile。dsh --profile headless "用 subagent 工具派 1 个子代理写 hello.go(内容:打印 hello from go 的 main 函数),等它返回后告诉我结果"$DSH_HOME/sessions/<workspace>/<subagent-session>/session.jsonl.zstd,检查tool/call事件。实际结果:子代理会话的
tool/call事件name与callId均为空串(arguments 内容完整,含 file_path 与 content):{"type": "tool/call", "data": {"turn": 1, "step": 1, "callId": "", "name": "", "arguments": "{\"file_path\": \"...hello.go\", ...}"}}对应
tool/result为Error: unknown tool "",文件未写入。三次执行(1 次双子代理并行 + 2 次单子代理)表现一致。主代理自身的工具调用(write_file、bash)在同一会话内正常。预期结果:子代理的流式 tool-call delta 正确拼装出 name 与 callId,工具正常执行,文件落盘。
环境:dsh 0.1.0-rc.6(npm 安装),Node v22.23.1,macOS(Darwin 25.6.0)。模型端点为 OpenAI 兼容网关(火山方舟,deepseek-v4-pro-260425),通过用户补丁层改接
llm-deepseek的 baseURL/models。注:主循环工具调用经同一端点正常,问题仅在 subagent spawn 路径;如维护者需要,可协助用官方端点对照复现。验收条件:子代理会话中
tool/call.name非空且工具执行成功,hello.go落盘;主代理能收到子代理结果并汇总。All reactions