`send_and_wait` resolves on a sub-agent's `session.idle` / `session.error`
还没有人认领这个 Issue。
评估
调研方向
Start in rust/src/session.rs at handle_notification and its send_and_wait waiter arm around lines 2256 and 2282-2304. Trace how agent_id is handled for session.idle, session.error, and assistant.message events. Add the regression test described in the issue: a child-tagged session.error must not resolve the parent wait, while a root session.idle must resolve it.
由索引模型根据 Issue 内容生成。
描述
Repo/version: github/copilot-sdk, tag rust/v1.0.14 (e60d9037); CLI runtime 1.0.84-5.
Behaviour: A parent turn's send_and_wait returns early, with the wrong result, when a spawned sub-agent fails or goes idle.
Cause: handle_notification (rust/src/session.rs:2256; the waiter arm :2282-2304) takes the send_and_wait waiter on every session.idle / session.error and records every assistant.message as the wait's last message, with no agent_id check. The CLI's subagent bridge re-emits child events on the parent stream carrying the child's agent_id (the CLI runtime re-emits sub-agent events on the parent stream tagged with the child agent_id; session.error is among the re-emitted types), so a child's model-call failure resolves the parent's wait.
Fix shape: Only events with no agent_id (or equal to the root session's) may resolve the waiter or set its last message. Child-tagged idle/error/message events are ignored by the waiter (they still reach on_event).
Regression test: parent wait in flight; inject session.error with a child agent_id → wait NOT resolved; inject root session.idle → resolved.
Downstream: a consumer of this crate carries a local patch for this and cannot drop it until it is fixed upstream.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 130
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 65/100
inu-appcenter/memorIN-backend#288 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
frontend maui-pilot pilot-ask question
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
area/plugin
难度 2/5 1-3 小时 新手友好度 75/100
kestra-io/plugin-kestra#190 ·