Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#2,750 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
api

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
10.5k
Forks
1.5k
Avg merge
1d 9h
Merged PRs (30d)
130

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/copilot-sdk

All issues in github/copilot-sdk

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.