Skip to content

Expose IncludeSubAgentStreamingEvents in all four SDKs#1108

Merged
stephentoub merged 3 commits intomainfrom
stephentoub/expose-include-subagent-streaming-events
Apr 18, 2026
Merged

Expose IncludeSubAgentStreamingEvents in all four SDKs#1108
stephentoub merged 3 commits intomainfrom
stephentoub/expose-include-subagent-streaming-events

Conversation

@stephentoub
Copy link
Copy Markdown
Collaborator

@stephentoub stephentoub commented Apr 18, 2026

Completes the client-side exposure of includeSubAgentStreamingEvents from runtime.

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>
@stephentoub stephentoub requested a review from a team as a code owner April 18, 2026 01:21
Copilot AI review requested due to automatic review settings April 18, 2026 01:21
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_events to the public session config types in all four SDKs.
  • Wires the option through to session.create and session.resume payloads, defaulting to true when 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

Comment thread dotnet/src/Types.cs
Comment thread dotnet/src/Types.cs
Comment thread nodejs/src/client.ts
Comment thread nodejs/src/client.ts
Comment thread python/copilot/client.py
Comment thread python/copilot/client.py
Comment thread go/client.go
Comment thread go/client.go
- .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>
@stephentoub stephentoub enabled auto-merge April 18, 2026 01:46
@stephentoub stephentoub disabled auto-merge April 18, 2026 01:46
@stephentoub stephentoub merged commit 922959f into main Apr 18, 2026
34 of 35 checks passed
@stephentoub stephentoub deleted the stephentoub/expose-include-subagent-streaming-events branch April 18, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants