[bug] code 模式下 run_code/bash 同名 required description 导致工具调用死循环 #558
rongyulin3
started this conversation in
General
Replies: 1 comment
|
Minimal fix for the identical-error attribution (tool name in |
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.
一句话
code模式下run_code和bash都把 UI 摘要字段叫description且标成 required,模型常把内层bash.description当成已经传过,外层 JSON 只剩{"code":"..."},于是反复报missing required property "description",看起来像工具层随机丢参数。English summary
In code mode, both
run_codeandbashrequire adescriptionthat is documented as UI-only. Models frequently putdescriptioninsidetools.bash({...})in thecodestring and omit the outerrun_codeargument. Validation then fails with the sameinvalid arguments: missing required property "description"string used for both layers, so the model concludes the harness is dropping fields and retries forever. Session logs show the model never emitted the outer key.环境
@deepseek-ai/dsh0.1.0-rc.6code(只允许直接调用run_code)复现
codepreset 开一轮,让模型执行需要bash的诊断/搜索。run_code的 tool-callarguments原始 JSON。{"code":"const out = await tools.bash({\n command: \"...\",\n description: \"Check port listeners\"\n});\nreturn out.stdout.text;"}注意:内层 bash 的
description在 code 字符串里;外层 JSON 没有"description"键。Error: invalid arguments: missing required property "description"(ToolArgsError/INVALID_ARGS)。repeat-tool-reminder把规范化参数回显成arguments: {"code":"..."},模型据此认定 harness 丢掉了字段,换内容重试,成功率极低。一次真实会话的计数(不是抽样感觉)
同一会话 160 次
run_code:codeINVALID_ARGS(缺run_code.description)code+descriptionbash没带description(workerbindingFailure→ToolCallError)那 156 次里,有 120 次
code字符串中已经写了description:。所以这不是传输随机丢字段:JSON.parse后对象里本来就没有外层键。对照成功调用(外层键齐全):
{"code":"... tools.bash({ command: \"...\", description: \"...\" }) ...","description":"Check port 3081 connectivity and listeners"}失败的“外层有 description、内层没有”的那一次,code 是:
报错栈在
dsh-code-runtime-worker-thread的bindingFailure,文案仍然是同一句missing required property "description"。为什么模型会误判成 harness bug
run_code.description和bash.description,schema 文案都写着 “shown in the UI”。invalid arguments: missing required property "description"。外层是defineTool的ToolArgsError;内层是 worker 把 bash 的ToolArgsError包成ToolCallError。{"code":"..."},于是写 “harness dropped description”。相关代码:
dsh-toolscreateRunCodeTool:code和description都是required: true;description说明是 5–10 词 UI 摘要。dsh-tool-bash:command和description同样required: true,README 写明 description 不影响执行。dsh-agent-loopparseArguments:JSON.parse(raw),没有剥键。dsh-code-runtime-worker-threadbindingFailure:内层失败也复用同一句 message。预期
run_codemissingdescriptionvsbashmissingdescription)。建议(任选,按侵入性)
invalid arguments for run_code: missing required property "description"/invalid arguments for bash: ...。这是最小改动,能打破“harness 丢参数”的错误归因。description改成 optional,缺省时用 command/code 截断当 UI 标题(README 已说它不影响执行)。summary/label,避免和 SDK 里每个工具的description撞名。code和description,内层 bash 的 description 不能代替外层。验收
bash({command, description})、外层缺description时,错误明确说是run_code缺字段,而不是让模型以为传输丢了。description时,错误明确说是bash。run_code不再因为同名 UI 字段出现接近 97% 的INVALID_ARGS死循环。All reactions