.NET: runtime logs forwarding session.idle, but SDK callback never delivers it
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- csharp
調査の方向性
特定のファイルは指定されていません。まず .NET セッションのサブスクリプションと FIFO ディスパッチ経路を追跡し、次に session.waitForIdle の提案されたランタイム契約を、session.idle および GetEventsAsync の処理と併せて確認します。完了条件は、すべての先行イベントの完了を待機し、破棄されたアイドル通知を処理し、失敗を表面化し、キャンセルをサポートすることを回帰テストで示すことです。
索引モデルが issue の本文から書いたものです。
説明
Summary
Visual Studio can remain indefinitely in the running state after the Copilot CLI has completed a response.
The CLI verbose log shows that it forwarded the terminal, ephemeral session.idle event. The .NET SDK subscription receives the preceding events, including the final assistant.turn_end, but never receives SessionIdleEvent.
Because session.idle is ephemeral, it cannot be recovered later through GetEventsAsync(). The client therefore has no authoritative completion signal and continues waiting.
Environment
- GitHub.Copilot.SDK:
1.0.1 - Copilot CLI runtime:
1.0.61 - Windows ARM64
- Visual Studio Agent and Agent (Preview) modes
The current SDK 1.0.7 still does not expose a durable idle wait or event-dispatch flush API.
Observed behavior
The CLI log ends with:
Forwarding event ... assistant.turn_end
Forwarding event ... session.idle (ephemeral)
The .NET subscriber observes assistant.turn_end, but not session.idle. The operation remains active even though the runtime has finished.
The absence of session.idle from events.jsonl is expected because the event is ephemeral; it does not explain why the live subscriber missed it.
Why assistant.turn_end is insufficient
In multi-turn tool workflows, an intermediate assistant.turn_end can be followed immediately by another assistant.turn_start. Completion also needs to account for sub-agents, attached shells, queued messages, and follow-up notification turns.
Requested fix
Please provide an authoritative completion contract owned by the runtime/SDK, for example:
await session.WaitForIdleAsync(cancellationToken);
It should:
- Wait for turns, sub-agents, attached shells, queued work, and follow-up turns to settle.
- Resolve only when the runtime is fully idle.
- Ensure preceding session events have crossed the .NET SDK FIFO dispatch queue.
- Surface session errors and transport failures.
- Remain correct if the live
session.idlenotification is dropped. - Support cancellation without leaving an orphaned waiter.
An equivalent session.waitForIdle runtime RPC combined with an SDK dispatch barrier would also work.
Regression test
Add a .NET test where a multi-turn response completes, the live session.idle notification is deliberately dropped, and the completion wait still resolves only after all preceding assistant and tool events have been delivered.
Related
- #794 - identifies missing
session.idleand silent notification drops, but its proposed fallback did not ship - #558 - timeout waiting for
session.idle - #791 - serialized FIFO event dispatch in the .NET SDK
- #927 - ephemeral events are intentionally unavailable through replay
- #1275 -
assistant.turn_endalone is not a completion signal
- 主要言語
- Java
- スター
- 10.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 130
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
certification
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's オープンbug ecr
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Needs: Triage Type: Feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AntennaPod/AntennaPod#8794 ·
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100