Add remote_session field to all SDK SessionConfig types#1295
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust SDK’s hand-authored session configuration types to expose the runtime’s new remoteSession control for session.create and session.resume, using the already-generated RemoteSessionMode enum.
Changes:
- Added
remote_session: Option<RemoteSessionMode>toSessionConfigandResumeSessionConfig(serde camelCase on-wire via existingrename_all = "camelCase"). - Updated
Debugand initialization defaults to include the new field. - Added
with_remote_session()builder methods for both config types.
Show a summary per file
| File | Description |
|---|---|
| rust/src/types.rs | Wires RemoteSessionMode into SessionConfig / ResumeSessionConfig via a new optional remote_session field plus builders/defaults/debug output. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
cba339a to
f52379a
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
Generated by SDK Consistency Review Agent for issue #1295 · ● 1.8M
10f2dc7 to
94cf020
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
Generated by SDK Consistency Review Agent for issue #1295 · ● 577.5K
94cf020 to
0d58c34
Compare
This comment has been minimized.
This comment has been minimized.
0d58c34 to
70db81d
Compare
This comment has been minimized.
This comment has been minimized.
stephentoub
reviewed
May 14, 2026
stephentoub
approved these changes
May 14, 2026
tclem
reviewed
May 14, 2026
70db81d to
eb3dc6d
Compare
This comment has been minimized.
This comment has been minimized.
Add per-session remote behavior control (Off/Export/On) to SessionConfig and ResumeSessionConfig across all SDK languages (Rust, Go, Node.js, Python, .NET). Each SDK wires the field into the JSON-RPC create/resume payloads using the existing generated RemoteSessionMode type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
eb3dc6d to
9ecade7
Compare
Contributor
Cross-SDK Consistency Review ✅This PR maintains excellent cross-SDK consistency. The
Notable design points
No consistency gaps found.
|
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.
Overview
What
Adds a
remoteSession/remote_session/RemoteSessionfield to bothSessionConfigandResumeSessionConfigacross all SDK languages (Rust, Go, Node.js, Python, .NET), giving SDK clients explicit per-session control over remote behavior.Why
The runtime added support for a
remoteSessionparameter onsession.createandsession.resumein copilot-agent-runtime#7673, but the SDK hand-written types were never updated to expose it. TheRemoteSessionModetype already exists in each SDK's generated types, so this wires it into the session config structs and create/resume payloads.Changes
rust/src/types.rs) — Addedremote_session: Option<RemoteSessionMode>field, Debug output, Default value, andwith_remote_session()builder method to bothSessionConfigandResumeSessionConfig.go/types.go,go/client.go) — AddedRemoteSessionfield toSessionConfig,ResumeSessionConfig, and wire request structs; wired into create/resume payloads.nodejs/src/types.ts,nodejs/src/client.ts,nodejs/src/index.ts) — AddedremoteSession?: RemoteSessionModetoSessionConfiginterface (picked intoResumeSessionConfig); wired into both payloads; exported the type.python/copilot/client.py) — Addedremote_session: RemoteSessionMode | Noneparameter tocreate_sessionandresume_session; wired into payloads using.valuefor wire serialization.dotnet/src/Types.cs,dotnet/src/Client.cs) — AddedRemoteSessionproperty to both config classes and clone constructors; added to wire records; wired into create/resume calls.Usage
Downstream
This unblocks github/github-app#4914 which needs to set
remoteSession: "export"for all sessions.