-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
github/copilot-sdk
#783Description
Summary
Multi-agent orchestration sessions get stuck at IsProcessing=true when cancellation tokens fire. The root cause is a bug in the Copilot SDK where StreamJsonRpc.RequestId is not included in the AOT-safe JSON serialization context.
Symptoms
- Orchestrator sessions show Thinking... forever
- Crash log shows NotSupportedException for RequestId serialization at StreamJsonRpc.StandardCancellationStrategy.CancelOutboundRequest
- 180s watchdog fires, response length is 0
Root Cause
SDK Bug: When a CancellationToken fires during an SDK call, StandardCancellationStrategy tries to serialize RequestId, but the SDK's SystemTextJsonFormatter doesn't include it in the TypeInfoResolverChain. The exception is unobserved, killing the JSON-RPC reader silently.
Workaround
PR implements workaround: pass CancellationToken.None to SDK SendAsync calls. Cancellation is handled at the TCS level via ResponseCompletion.TrySetCanceled().
Action Items
- Decide whether to file issue on github/copilot-sdk
- Monitor for SDK fix
- Remove workaround once fixed
SDK Versions Affected
- Broken: 0.1.30, 0.1.32
- Works: 0.1.26
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels