You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent Teams 下用 subagent 并行委派缺少 join 原语:主模型在子代理返回前就下结论,之后再补充和更正
#8643
{"timedOut":false,"noProgress":{"reason":"no-active-peer",
"message":"No other Team member is running or provisioning. wait_agent cannot make progress or wake inactive teammates. Re-list with list_agents and team_task_list, then use send_message to wake each required inactive teammate before waiting again."}}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
环境
0.2.0-rc.2(macOS arm64,构建于 2026-09-29);本机另装有dshCLI0.1.5-rc.2web/desktop,已启用@deepseek-ai/dsh-experimental-agent-team-profile(Agent Teams)deepseek-flash,reasoning effortmax~/.dsh/sessions/<workspace>/<session-id>/session.v4.jsonl.zstd(session format v4)一、摘要
在启用 Agent Teams profile 的会话里,如果模型用
subagent(而不是spawn_teammate)做并行委派,它没有任何办法等待这些子代理:wait_agent立刻返回noProgress / no-active-peer,list_agents看不到它们,send_message也联系不上。于是主模型只能结束当前 turn,给出一个看起来已经完成的结论;随后每个子代理的 settle notice 各自开启一个新的 turn,逐条产出「补充」,有时是「更正」。用户看到的就是:先给结论 → 再补充 → 再更正。
本机 191 份会话记录里,10 个会话用过子代理/队友;其中 3 个会话出现「仍有后台子代理在跑,主模型已给出 ≥1.9k 字符的结论」,2 个会话随后明确更正了先前的结论(其中一次的原话是「我上一轮给你的总结里有一个结论是错的,必须收回」)。
与 #7642 / #7087 相关但不重复:那两条讲的是子代理对 Team 工具不可见;这条讲的是由此产生的回答时序与结论质量问题。
二、Lead 拿到后台子代理时发生什么
同一步里发起 3 个
subagent调用(没有传run_in_background参数),每个都立刻返回:这些 call id 之后再也没有第二条
tool/result:唯一的完成信号,是每个子代理停止时投递的subagent-settled收件箱通知。三、Lead 尝试等待时拿到什么
wait_agent是工具集里唯一的阻塞原语,但它的作用域是 Team。在三个subagent子代理都还在跑时调用,它立刻返回:{"timedOut":false,"noProgress":{"reason":"no-active-peer", "message":"No other Team member is running or provisioning. wait_agent cannot make progress or wake inactive teammates. Re-list with list_agents and team_task_list, then use send_message to wake each required inactive teammate before waiting again."}}另一个会话(
15:00:05)结果相同。在所有用subagent委派的会话里,wait_agent没有一次真正阻塞过。四、最终的回答时序(单个会话,已脱敏,本地时间)
也就是说,用户看到的顺序不是渲染假象:这些 assistant 消息确实在子代理报告之前就已产出,而之后每个子代理的消息都会开启一个新 turn,再产出一条新消息。
五、本机历史记录里的规模
方法:解压
~/.dsh/sessions下所有session.v4.jsonl.zstd(共 191 个会话),把subagent/spawn_teammate调用与对应的subagent-settled/team/message/delivered事件配对,再和「含文本且无工具调用」的 assistant 消息比对时间戳。wait_agent调用:11 次发生在spawn_teammate会话中,正常阻塞(例如 338 秒、104 秒、399 秒)并在下一条 teammate 事件时返回;2 次发生在subagent委派会话中,立即返回noProgress/no-active-peer。换句话说:用
spawn_teammate时 Lead 能等、也确实等了全部队友;用subagent时它等不了,「最终回答 → 补充 → 更正」的模式随之出现。六、为什么我认为这不只是「模型自己选择得不好」
Team 的提示词要求的,恰好是模型做不到的事:
但保留下来的委派工具并不属于 Team 作用域:
subagent子代理不是 Team 成员,list_agents永远不列它们,send_message也到不了它们([Bug] Agent Teams bundle 在 Web/Desktop 未禁用 subagent:子代理不在 Team roster,list_agents/send_message 找不到也联系不上 #7642、[Bug] Duplicate tool names across scopes: Teams' `send_message` shadows `tool-subagent-control`'s, breaking plain continuable subagents #7087);agent-team-profile/README.md),但subagent/subagent_fork仍然暴露;wait_agent只观察 Team 的 roster / mailbox / task 边,因此拒绝为这些子代理等待。于是 Lead 处在一个矛盾状态:提示词禁止它下最终结论,但没有任何工具能让它等待。用当前最好的结论结束 turn 是一个局部合理的选择,代价则落在用户身上,表现为一轮轮更正。
七、最小复现
@deepseek-ai/dsh-experimental-agent-team-profile(web 或 desktop)。subagent并行派 3 个子代理(不要提 Agent Teams)。wait_agent返回noProgress/no-active-peer;之后每个子代理的 settle notice 开启新 turn,产出补充或更正。八、可选方案(不互斥)
wait_agent覆盖 continuable 后台子代理:把每个在跑子代理的 settle 边注册进同一个等待集合,让 Lead 能一直阻塞到自己启动的子代理都报告为止。wait_agent({ targets: [...] }),或wait_subagents({ ids, mode: "all" }),在列出的子代理全部结算后返回(带单次调用的时间预算)。如果需要,我可以拿同一批会话记录验证上述任一方案;也可以提供原始事件序列(id/时间戳,正文脱敏)。
All reactions