Replies: 3 comments 2 replies
|
已定位根因:continuable 后台子代理在 turn 结束时若调用了注入的 |
|
Confirmed — the root cause matches our repro exactly: our parent session did call send_message mid-flight (the child then ran a second turn), and the duplicate arrived as "minutes later" because it queued behind the parent's remaining turn. The steer (next-step) vs followup (next-turn) asymmetry in #2192 explains both the duplication and the order inversion we saw. Fix proposal A (mark relayed output on the Activation, omit closing output in notifySettlement when already relayed) sounds right to us. Thanks for the thorough source-level analysis! |
|
以下GPT生成并且人类大概审阅 补充一下当前新版 DSH 的情况。 现在原来的单向
但原先这个重复交付问题在新的实现里似乎仍然以另一种形式存在。 当前 continuable subagent 启动时,会被额外注入类似下面的提示: 与此同时,subagent settle 时,runtime 本身又会自动把 child 的 final assistant message 作为 settlement notice 交给 parent。 因此如果 child 按这条提示在结束前调用一次 除了 token/context 浪费之外, 我也尝试过在 但实际测试效果不好。 subagent 确实同时看到了两段互相冲突的提示:一段来自 模型自己也明确表示两条指令存在冲突,并倾向于遵守后面这个更加 task-local、措辞更加直接的硬编码提示。也就是说,单纯通过 目前我使用的临时 workaround 是直接用 大致方法: pnpm patch @deepseek-ai/dsh-subagent@<实际安装版本> \
--edit-dir ./dsh-subagent-patch然后找到编译后的文件中对应字符串: rg -n 'Before you finish|send your result' ./dsh-subagent-patch通常修改发布包里的 最后: pnpm patch-commit ./dsh-subagent-patch这样 pnpm 会生成 patch,并在以后安装该版本依赖时自动应用。 现在的 而不是要求 child 在结束前用 |
Uh oh!
There was an error while loading. Please reload this page.
Observed on
@deepseek-ai/dsh@0.1.0-rc.6.What happened
subagenttool,run_in_background: true).send_message(message parks, becomes the child's next turn).Expected: exactly one settle notice containing the final assistant message.
Actual: the identical closing message was delivered to the parent twice — first as the
finished ... closing message:notice, then again minutes later as aBackground subagent <id> reported:notice with the same content.Impact
Guess at the seam
Looks like two delivery paths both fire for the same settled turn — the "finished" notice on settle and a queued "reported" delivery that wasn't deduplicated after a mid-flight
send_messageturn. Happy to provide session logs if useful.All reactions