Replies: 2 comments
Raw evidence (from the session log, sensitive IDs redacted)1. Reasoning vs emitted tool-call — same turn, model output as capturedStreamed blocks at turn 3 / step 20 (the agent intends to call { "type": "reasoning",
"text": "我需要直接调用 team_create 工具。这些工具是模型可见的,我在当前会话中可以调用它们。让我直接调用。" }
// translation: "I need to call the team_create tool. These tools are model-visible; I can call them in this session. Let me call it directly."
{ "type": "tool-call",
"id": "call_00_hoea...7878", // redacted
"name": "bash",
"arguments": "{ "command": "echo \"=== 冒烟测试:调用 team_create ===\"", "description": "Smoke test marker" }" }
{ "type": "usage",
"usage": { "inputTokens": 78, "outputTokens": 100, "cacheReadTokens": 237568, "reasoningTokens": 26 } }The reasoning block says "call team_create"; the emitted call in the same response is 2. Consecutive bash calls during the loop (every one succeeded)All returned 3. Duplicate-call guard fired only twice, and was ignoredThe guard message (injected as a user message) appeared at seq 177261 and seq 180266:
The agent continued looping afterwards regardless. Later in the loop, Session totals: 1139 |
|
这份取证很难得——推理层说要调 X、动作层却持续发 Y,而且因为 bash 永远 补一条你可能用得上的机制事实。 模型看到的工具表是可以被改写的DSH 的 对你这个场景,直接的用法是:在跑这类冒烟测试时,把 边界写清楚:
另一半:空转 echo 应该被识别为"没进展"即使不摘 bash,一个确定性的断路器(比对最近 N 次同名同参调用,命中就直接返回否决结果、并把"已被断路"如实写回工具结果让模型改道)能把 966 次砍到 3 次。这同样需要写,而且我没见到现成的包。 我不建议用"第二个模型来审批每次工具调用"那类方案顶这个——那是用一个概率性判断去治另一个概率性失败,而这里你需要的是确定性的计数。 边界我们不修 DSH 的 agent loop,也改不了模型的推理/动作解耦。上面两条都是"在模型看见之前动手"的思路,而且都还没有人做成包。 你这份报告最有价值的部分我觉得是那句"bash 永远成功所以循环收不到失败信号"——这可能值得单独提给官方:一个总是成功的工具,在 agent loop 里是没有刹车的。 利益相关:我维护 pi2dsh。上面那个 |
Uh oh!
There was an error while loading. Please reload this page.
Environment
@deepseek-ai/dsh, apps/cli)team_create,team_spawn,team_assign,team_msg,team_task,team_status,team_interrupt,team_collect)Summary
The agent's reasoning layer says it will call tool X, but the action layer repeatedly emits tool Y (bash). Because bash always succeeds (
isError: false), the loop never receives a failure signal and spins until the user manually interrupts it.Reproduction
cordis_define(tools confirmed present in the model request:request/headertools list contained all 8team_*tools, schemas valid).team_create.echomarkers (echo "calling team_create",echo "direct",echo "invoke", ...).Evidence (from session log)
name: "bash",arguments: {command: echo "=== 冒烟测试:调用 team_create ==="}— i.e. the model generated bash, notteam_create.isError: falsewith the echoed text, so the model reads "success" and in the next turn repeats: "now call team_create for real" -> emits bash again. Reasoning and action each loop independently and never converge.cacheReadTokens=237568, freshinputTokens=78per turn — 42 tools in the list, model repeatedly picked the earlybashtool overteam_create(position ~34)."You are repeating the exact same tool call"fired twice); the loop alternated echo strings (direct/invoke/calling/skip/true) and later repeatedecho "direct"6 times without interception.Root causes (hypotheses)
bashinstead of the intended dynamic tool.Suggested fixes
Happy to provide the full session log path or more extracted evidence on request.
All reactions