普通 subagent 收到 main 通过 SendMessage 发来的 coordinator 消息后,可以通过
RespondToCoordinator 把回复投递给父 runtime,同时继续原任务。
SendMessage 保持 main-only。RespondToCoordinator 保持 child-only,provider input 只有 summary 和 message。taskType === "subagent_child"、coordinator port 已配置且未被全局
toolDisallowlist 禁用时注册;使用指导只随实际工具 description 出现。priority <= next 的 command snapshot,
将 snapshot 内的 task-notification / subagent-message 与当前 tool result 合流。prompt 和 target continuation 不由 active-loop snapshot 消费,继续留在 outer queue。<subagent-message>,持久化 source 为
subagent_message、visibility 为 model-only。ReadSession 的读取结果。child tool lifecycle mirror 仍可供兼容消费者和诊断使用,但父 V4
ProductProjection 不把普通 child tool mirror 物化成 ToolCallRow;专属
RespondToCoordinator 卡片只在 child session conversation 中展示,父会话继续只显示
Agent/Task 摘要。RespondToCoordinator 不结束任务。<subagent-message> carrier 才写入 parent
model history 和 session store,其中包含经过 schema 校验、XML 转义但不做额外语义截断的
summary 和 message。这样 active/idle 投递、session hydrate 和 parent resume 使用同一份模型
上下文;enqueue success 本身仍不代表已经持久化。subagent_message 与
SessionEventType.SubagentMessage lifecycle/progress event 是两套结构。后者只用于进度摘要;前者是
coordinator response 的完整 model input,不能依据历史 progress-event 约束截断成摘要。model-only 是展示和上下文投影边界,不是“不落盘”标记。用户可见消息 projection、session
title 和 ReadSession 必须过滤该 carrier;读取原始 parent session store 的导出、诊断、
隐私审查和存储预算必须按可能包含完整回复处理。RespondToCoordinator 明确发送的单条回复,不复制 child 全量 transcript。RespondToCoordinator 使用 concurrentSafe: true。它可以和 Read、Glob、Grep 等
concurrent-safe 工具进入同一 parallel group;Bash、Write、Edit 继续遵循现有 scheduler
安全规则。模型应优先发出回复调用,并在同一 assistant step 中继续发出下一项工作工具调用。
child 当前正在执行的 tool batch 不会被 coordinator input 中断;steer drain 会在 batch
结束后、下一次 child provider request 前追加 Message from coordinator: input。若 coordinator
input 到达时 child 的当前 model step 正常 text-only 收口,则先持久化该 assistant,再以
user role 追加 coordinator input,并沿同一 active turn 续发下一次 provider request;只有
stop/cancel/interrupted 等无法继续当前 turn 的终态,或既有 FIFO barrier 阻止安全 inline
时,才回退普通 future queue。
readOnly: false、destructive: false、sideEffectScope: "session"。allowedInPlanMode capability 允许该非破坏、无需审批的 session-local
control action。priority: "next"。
两者可以出现在同一 provider request 或相邻 request,但 response 的首次 provider-visible
位置必须早于 completion notification。summary 和失败状态,不复制 message、responseId、
error 或原始 result;真实 tool execution failure 的错误原因只通过 ToolLayout 通用失败状态
tooltip 在 hover/copy 时展示,业务 status: "failed" 不凭空生成错误详情或展开区。subagent-message 不保证进入当前请求,允许由后续 active request 或 outer queue 消费。SendMessage。replyTo、消息已读回执或 durable mailbox。subagent_message 不进入 local relevant snippets。BG25:SendMessage -> RespondToCoordinator + continued work -> parent model-only wake ->
child completion,同时验证 child conversation 可观测性、父会话不物化普通 child tool row
和无顶层 synthetic user bubble。O19:真实 schema validation error 下,已覆盖 child 卡片正文只展示 input summary
和“回复失败”、不展示 provider wrapper 或原始错误正文,且卡片不可展开。hover 失败状态后
通用 tooltip 展示对应 context.errorText 的 WDIO 断言尚未补齐,当前覆盖状态保持
partial。