Repository navigation
Replies: 3 comments
|
Thanks for the detailed reproduction and for tracing the tool-name collision to the two separate I agree that exposing separate tool names is the cleanest long-term solution. One additional consideration is preserving backward compatibility while making the model-facing capabilities unambiguous. I would suggest introducing an explicit This would avoid changing how existing Agent Teams sessions resolve teammate names and prevent UUID-based routing from accidentally targeting an unrelated team member. The regression tests should cover at least these scenarios:
I would also add a contract test that checks the model-visible tool descriptions against the tools actually registered in the active context. That last test matters because the original issue is not only a routing failure: the model is explicitly instructed to use a capability that becomes unavailable after tool shadowing. For the immediate fix, it may be worth separating two changes:
The A useful acceptance criterion would be that the minimal reproduction succeeds with Agent Teams enabled, while existing teammate-name messaging continues to work without modification. This should make the fix verifiable across both execution modes and help prevent future regressions when additional tools are registered with overlapping names. |
Independent reproduction + workflow impact on 0.2.1-rc.2 (Agent Teams session)Confirming this on a fresh install of Same asymmetry as reported: the child's messages arrive fine (
Why this is not just a wording problemThis came up during a deadline-bound session (the user imposed a hard 20-minute end). Two So the practical failure mode is: a parent cannot stop or steer a Additional data pointThe error text also makes the model retry with |
|
There is an existing rc.2 configuration option for the interruption part of the latest reproduction. The Team tool plugin only registers its For a temporary setup that exposes the ordinary child-ID interrupt tool, apply these overrides in the affected profile's - id: tool-subagent-control
disabled: false
- id: tool-agent-team
config:
interrupt: falseBoth entries matter: the shipped Team profile explicitly disables the legacy controller. Disabling only the Team interrupt registration can therefore leave no interrupt tool. After the change has loaded, check that the visible {"agent_id": "<child-session-id>"}This replaces the Team name-based interrupt entry point. I checked the published rc.2 plugins on Node 24 and 26 using the real Cordis tool registry and scoped contexts. With both overrides, the child-ID request reaches the original controller with its ancestor-caller authorization unchanged; without restoring the controller, the tool is absent. The domain services were test doubles: I have not tested a live Desktop child interruption or an active-profile reload. This is a limited routing workaround, not the complete mixed-tool fix proposed above. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
send_messagecannot address subagents by id in Agent Teams sessions, but thesubagenttool description says it can中文版见下方
Summary
In a session where Agent Teams is enabled, the
send_messagetool exposed to the model accepts only teammate names (targetparameter). Passing theagent_idreturned by thesubagenttool fails with a misleading error:This contradicts the
subagenttool's own description, which instructs the model to "usesend_messageto steer it while running or continue its conversation after it finishes".The
dsh-tool-subagent-controlpackage already implements id-based messaging correctly, but in an Agent Teams session its tool is shadowed by the Team-scopedsend_message, so the model never gets access to it.Environment
@deepseek-ai/dsh0.2.1-rc.2 (latest on npm at the time of writing)resolveActiveMemberindsh-experimental-agent-team) is byte-for-byte identical, so the same failure applies.dsh webGUI session with Agent Teams enabledSteps to reproduce
subagenttool withrun_in_background: true.79557625-e036-4217-97bd-b157672f2ecd.Expected
Per the
subagenttool description, the message should steer the running child (or start a new turn in it).Actual
The child itself has no trouble reporting back to the parent — the up-channel works:
So the failure is asymmetric: child → parent works, parent → child does not.
Root cause
Two different tools register the same model-facing name
send_message, with different schemas and semantics:@deepseek-ai/dsh-experimental-tool-agent-teamtargetlist_agents(or"lead")@deepseek-ai/dsh-tool-subagent-controlagent_iddsh-tool-subagent-controlis a dependency ofdsh-base(node_modules/@deepseek-ai/dsh-base/package.json), so it is part of the base bundle. The Agent Team plugin then registers its ownsend_messagethroughagent.ctx(per-agent scoped tools), which overrides the base tool for that agent. The result is that a Team Lead sees only thetarget-based tool.Code references (0.2.1-rc.2 compiled output):
dsh-experimental-agent-team/lib/types/roster.js:18-27—resolveActiveMember()resolves strictly by name and throws the generic error:dsh-experimental-tool-agent-team/lib/index.js:292-306— Team-scopedsend_messagewithtargetonly. It does not carry theadjacentAgentSendMessageToolmarker.dsh-tool-subagent-control/lib/index.js:22-36— the id-based tool withagent_id.dsh-tool-subagent/lib/index.js:384— thesubagentdescription that promises the capability.Additional notes:
list_agentsreturns only Team members, not plain subagents, so the Lead cannot discover an addressable name for asubagentchild — the child has no name at all.list_agentsand name-based retries, not toward the actual cause (an id handed out bysubagent).A previous fix attempt exists, but it does not cover Agent Teams
Commit
43840d6ece— "fix(subagent): harden adjacent message guidance" (2026-08-31) already tried to address this class of problem:adjacentAgentSendMessageToolmarker inpackages/subagent/subagent/src/internal.ts:send_messagedefinition indsh-tool-subagent-controlwith it.packages/subagent/subagent/src/manager.ts:463to decide whether to injectwithContinuableReturnGuidanceinto a child's initial prompt:subagentdescription wording.The gap:
dsh-experimental-tool-agent-teamnever callsmarkAdjacentAgentSendMessageTool. Verified in the compiled 0.2.1-rc.2 package: the Teamsend_messagedefinition carries no such marker. So when the Team tool shadows the control tool, the runtime cannot recognize it as the standard adjacent-message tool, and the guidance/description mismatch persists.The wording of the description has also changed across releases without resolving the underlying tool-availability question:
subagentdescription (relevant sentence)send_message; you are notified when the run settles."send_message; usesend_messageto steer it while running or continue its conversation after it finishes."Both promise id-based steering; neither is achievable in an Agent Teams session.
Suggested fixes
send_messagefor Team members and expose the control tool assend_subagent_message/message_agent), so both can be visible at once.send_messagefall back toctx.subagents.sendMessage()whentargetis not a known member name but is a live continuable child of the caller.dsh-experimental-tool-agent-teammark its definition withmarkAdjacentAgentSendMessageToolso the runtime recognizes it (this fixes the guidance gating, but not the missingagent_idcapability).resolveActiveMemberand report that an agent id cannot be addressed by the Team tool, pointing to the correct mechanism. Likewise, make thesubagentdescription conditional on whichsend_messagevariant is actually installed.Minimal repro harness (if useful)
The whole failure is observable without any domain code:
subagent({ description: "probe", prompt: "reply READY", run_in_background: true })send_message({ target: id, … })→ the error above.list_agents({})lists neither the subagent nor any name that could address it.Verified against installed
@deepseek-ai/dsh@0.2.1-rc.2on 2026-10-20. Happy to test a patch or provide additional traces.【中文版】Agent Teams 会话下
send_message无法按 id 寻址子代理,但subagent工具描述声称可以概述
在启用 Agent Teams 的会话中,模型拿到的
send_message工具只接受队友的名字(target参数)。把subagent工具返回的agent_id传进去,会得到一个极具误导性的报错:这与
subagent工具自身的描述相矛盾——它明确让模型"用send_message引导正在运行的子代理,或在它结束后继续对话"。dsh-tool-subagent-control包其实已经正确实现了按 id 投递,但在 Agent Teams 会话中,它的工具被 Team 作用域的send_message遮蔽,模型根本没有机会用到。环境
@deepseek-ai/dsh0.2.1-rc.2(撰写时 npm 上的最新版本)dsh-experimental-agent-team的resolveActiveMember)逐字节完全相同,因此同样会失败。dsh webGUI 会话复现步骤
subagent工具并设置run_in_background: true。79557625-e036-4217-97bd-b157672f2ecd。预期结果
按
subagent工具描述的承诺,消息应当能够引导正在运行的子代理(或在它空闲时开启新一轮对话)。实际结果
子代理反过来向父代理汇报则完全正常——上行通道是通的:
也就是说,故障是不对称的:子 → 父可用,父 → 子不可用。
根因
两个不同的工具注册了同一个模型可见的名字
send_message,但 schema 与语义都不相同:@deepseek-ai/dsh-experimental-tool-agent-teamtargetlist_agents的队友名字(或"lead")@deepseek-ai/dsh-tool-subagent-controlagent_iddsh-tool-subagent-control是dsh-base的依赖(node_modules/@deepseek-ai/dsh-base/package.json的dependencies段),因此属于基础 bundle。Agent Team 插件随后通过agent.ctx(按代理作用域的工具)注册自己的send_message,覆盖了该代理上的基础工具。结果就是 Team Lead 只能看到基于target的那个。代码引用(0.2.1-rc.2 编译产物):
dsh-experimental-agent-team/lib/types/roster.js:18-27——resolveActiveMember()严格按名字解析,找不到就抛通用错误:dsh-experimental-tool-agent-team/lib/index.js:292-306—— Team 作用域的send_message,只有target。它没有携带adjacentAgentSendMessageTool标记。dsh-tool-subagent-control/lib/index.js:22-36—— 基于 id 的工具,参数为agent_id。dsh-tool-subagent/lib/index.js:384—— 承诺了该能力的那句subagent描述。补充说明:
list_agents只返回 Team 成员,不返回普通 subagent。因此 Lead 无法为 subagent 子代理解析出可寻址的名字——它根本没有名字。list_agents和基于名字的重试,而不是真正的成因(这是个由subagent发出的 id)。此前已有一次修复尝试,但未覆盖 Agent Teams
提交
43840d6ece—— "fix(subagent): harden adjacent message guidance"(2026-08-31) 已经尝试处理过这一类问题:packages/subagent/subagent/src/internal.ts中新增adjacentAgentSendMessageTool标记:dsh-tool-subagent-control中的send_message定义打了标记。packages/subagent/subagent/src/manager.ts:463用它决定是否向子代理的初始提示注入withContinuableReturnGuidance:subagent的描述文案。缺口在于:
dsh-experimental-tool-agent-team从未调用markAdjacentAgentSendMessageTool。已在 0.2.1-rc.2 编译产物中验证:Team 的send_message定义上不存在该标记。因此,当 Team 工具遮蔽 control 工具时,运行时无法把它识别为标准邻接消息工具,指引与描述不一致的问题便一直存在。描述文案在各版本之间也改过,但都没有解决"工具到底可用不可用"这个根本问题:
subagent描述(相关语句)send_message; you are notified when the run settles."send_message; usesend_messageto steer it while running or continue its conversation after it finishes."两者都承诺了按 id 引导子代理,但在 Agent Teams 会话里都做不到。
修复建议
send_message继续用于 Team 成员,把 control 工具暴露为send_subagent_message/message_agent),使两者可以同时可见。target不是已知成员名、但确实是调用方的一个存活的可继续子代理时,让 Team 的send_message回退到ctx.subagents.sendMessage()。dsh-experimental-tool-agent-team用markAdjacentAgentSendMessageTool标记自己的定义,以便运行时识别(这能修好指引的判定条件,但补不上缺失的agent_id能力)。resolveActiveMember中识别 UUID 形态的输入,明确报告"代理 id 无法通过 Team 工具寻址"并指向正确机制;同时让subagent的描述依据实际安装的send_message变体来决定措辞。最小复现
整个故障不需要任何业务代码即可观察:
subagent({ description: "probe", prompt: "reply READY", run_in_background: true })send_message({ target: id, … })→ 出现上述报错。list_agents({})既不会列出该 subagent,也不会给出任何可用于寻址它的名字。基于 2026-10-20 已安装的
@deepseek-ai/dsh@0.2.1-rc.2验证。乐意配合测试补丁或提供更多 trace。All reactions