Expose IncludeSubAgentStreamingEvents in all four SDKs#1108
Merged
stephentoub merged 3 commits intomainfrom Apr 18, 2026
Merged
Expose IncludeSubAgentStreamingEvents in all four SDKs#1108stephentoub merged 3 commits intomainfrom
stephentoub merged 3 commits intomainfrom
Conversation
Add the includeSubAgentStreamingEvents property to session config types and wire payloads across Node/TS, Python, Go, and .NET. The property controls whether streaming delta events from sub-agents (e.g., assistant.message_delta, assistant.reasoning_delta, assistant.streaming_delta with agentId set) are forwarded to the connection. When false, only non-streaming sub-agent events and subagent.* lifecycle events are forwarded. The SDK defaults the property to true when not specified, so existing consumers automatically receive sub-agent streaming events without any code changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes the runtime’s includeSubAgentStreamingEvents session option across the Node/TS, Python, Go, and .NET SDKs so consumers can opt in/out of receiving streaming delta events emitted by sub-agents.
Changes:
- Adds
includeSubAgentStreamingEvents/include_sub_agent_streaming_eventsto the public session config types in all four SDKs. - Wires the option through to
session.createandsession.resumepayloads, defaulting totruewhen unspecified. - Updates .NET copy constructors/cloning behavior to include the new config property.
Show a summary per file
| File | Description |
|---|---|
| python/copilot/session.py | Adds the new boolean option to SessionConfig and ResumeSessionConfig TypedDicts with documentation. |
| python/copilot/client.py | Adds include_sub_agent_streaming_events parameter to create/resume APIs and sends includeSubAgentStreamingEvents on the wire. |
| nodejs/src/types.ts | Adds includeSubAgentStreamingEvents?: boolean to SessionConfig and includes it in ResumeSessionConfig. |
| nodejs/src/client.ts | Sends includeSubAgentStreamingEvents in session create/resume requests (defaults to true). |
| go/types.go | Adds IncludeSubAgentStreamingEvents *bool to config structs and request structs (wire field). |
| go/client.go | Defaults request field to true when config pointer is nil; forwards explicit values for create/resume. |
| dotnet/src/Types.cs | Adds IncludeSubAgentStreamingEvents to session config classes with default true and copies it in clone/copy constructors. |
| dotnet/src/Client.cs | Adds the field to the internal create/resume wire records and populates it from config. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 8
- .NET: Clone test assertions for SessionConfig and ResumeSessionConfig - Node.js: Wire payload tests for session.create and session.resume - Python: Payload capture tests for create_session and resume_session - Go: JSON marshal tests for createSessionRequest and resumeSessionRequest Each language tests both the default (true) and explicit false paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the client-side exposure of
includeSubAgentStreamingEventsfrom runtime.