DSH Bug 反馈报告:工具执行崩溃后回合被标记为已结束,留下悬空 tool_calls,会话永久 400 卡死 #2900
Replies: 2 comments 1 reply
DSH Bug 反馈报告:工具执行崩溃后回合被标记为已结束,留下悬空 tool_calls,会话永久 400 卡死
反馈渠道
标题(Issue title)环境
现象会话第 2 轮第一次 bash 调用执行时,harness 内部抛错: 该轮以 HTTP 400 根因分析
日志证据会话日志: 第 2 轮:用户请求 → assistant 带 tool-call → 崩溃 原始行(可直接粘贴到 issue): {"type":"assistant/message","seq":77538,"time":1786986863018,"data":{"turn":2,"step":1,"message":{"role":"assistant","content":[{"type":"reasoning","text":"The user asks: \"请你帮我展示一下,一共下载了几个插件。现在下载的这些插件都可以干什么。\" ..."},{"type":"text","text":"好的,我先核实一下当前 desktop profile 里实际安装的插件状态,再给你完整展示。"},{"type":"tool-call","id":"call_00_dOpvpER1s5wEbP8wSnws9097","name":"bash","arguments":"{\"command\": \"cd ~/.dsh/profiles/desktop\\necho \\\"=== dependencies(已安装的插件包)===\\\"\\npython3 -c ...\"}"}}]}}
{"type":"tool/call","seq":77539,"time":1786986863022,"data":{"turn":2,"step":1,"callId":"call_00_dOpvpER1s5wEbP8wSnws9097","name":"bash","arguments":"{\"command\": \"cd ~/.dsh/profiles/desktop\\necho ...\"}"}}
{"type":"step/end","seq":77540,"time":1786986863024,"data":{"turn":2,"step":1}}
{"type":"turn/end","seq":77541,"time":1786986863024,"data":{"turn":2,"reason":{"kind":"error","error":{"message":"Cannot read properties of undefined (reading 'prepare')","code":"UNKNOWN"}}}}第 3 轮起:每一轮都被 400 拒绝(此后 5 轮全部如此) {"type":"assistant/chunk","seq":77547,"time":1786986927298,"data":{"turn":3,"step":1,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"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)","code":"INVALID_REQUEST","status":400}}}}}建议修复
临时规避(已验证可行)把日志在孤儿 附注
|
|
Verified against rc.7 ( 1. The repair gap confirmed at source.
2. Your three fix suggestions map to real code paths:
3. The crash itself is a separate bug worth its own thread. 4. Family convergence. This is the 9th report in the session-corruption family (mechanisms across #1333/#1452/#1497/#1473/#1586/#2167/#2342/#2839 + now #2900), and the first with a balanced-looking log. The repair layer's "open turn only" trigger was the assumption that held until now — your report breaks it. The serialize-time pairing check (#3) is the one fix that protects all future writers, not just the current crash path. 5. Your truncation workaround is the correct recovery (truncate at the orphan Excellent report — the before/after seq evidence and the verified workaround make this actionable in one pass. |
Uh oh!
There was an error while loading. Please reload this page.
dsh-bug-report.md

All reactions