Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`send_and_wait` resolves on a sub-agent's `session.idle` / `session.error`

未关闭
#2,750 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
api

调研方向

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/copilot-sdk 的其他 Issue

查看 github/copilot-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。