Skip to content

docs: correct the remote sessions client option name - #2179

Merged
stephentoub merged 1 commit into
mainfrom
sdk-bugfix-37
Jul 31, 2026
Merged

docs: correct the remote sessions client option name#2179
stephentoub merged 1 commit into
mainfrom
sdk-bugfix-37

Conversation

@examon

@examon examon commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #2178

What was wrong

docs/features/remote-sessions.md documented a client option named remote (TypeScript) / Remote (Go, C#) for enabling Mission Control remote sessions. No such option exists. It was renamed to enableRemoteSessions / EnableRemoteSessions for cross-SDK consistency during the per-language API reviews (C# in #1343, TypeScript in #1357, Go in #1360), and none of those updated this guide. The Rust (#1367) and Python (#1376) reviews updated their own tabs in it, which is why 2 of the 5 language tabs were already correct and 3 were not.

Because every fenced block in this file carries <!-- docs-validate: skip -->, the documentation validation never compiled these snippets.

What this changes

Five lines in one file:

  • The section lead-in and the TypeScript, Go and C# examples now name the option that actually ships.
  • The Go example's return arity is corrected on the same line: NewClient returns a single value, so client, _ := copilot.NewClient(...) was a second, independent compile error. go build reports both errors together, so fixing only the option name would have left that example broken.
  • The ## Notes bullet named the same nonexistent option and also claimed the option "only applies when the SDK spawns the CLI process". The option is honored on both the child-process path and the in-process host path, and is ignored only when connecting to an already-running runtime, so the bullet is corrected rather than merely renamed.

The Python and Rust tabs are untouched; they were already correct.

Verification

Each corrected client-construction expression was extracted verbatim from the edited file and compiled against a local build of the affected binding, together with the pre-fix expression as a negative control:

Tab Before After
TypeScript TS2353 ... 'remote' does not exist in type 'CopilotClientOptions' tsc --noEmit exit 0
Go assignment mismatch: 2 variables but copilot.NewClient returns 1 value and unknown field Remote in struct literal of type copilot.ClientOptions go build exit 0
C# CS0117: 'CopilotClientOptions' does not contain a definition for 'Remote' dotnet build succeeded

The TypeScript case was additionally reproduced against the published @github/copilot-sdk@1.0.8.

The corrected ## Notes wording is pinned by the shipped sources: the option is turned into the same runtime flag on the child-process path and on the in-process host path in all five bindings, and it has no effect on any other path.

Not included

  • The remaining examples in this guide have separate, unrelated problems (the TypeScript and Python permission handlers, the Go event-type comparison, and the Rust snippet). This change does not address them, so the fenced blocks still do not compile as whole programs. The claim above is limited to the client-construction expressions that changed.
  • The C# and Rust doc comments for this option carry the same "only when the SDK spawns the runtime" inaccuracy that the ## Notes bullet had. They are left for a separate change.
  • docs/features/cloud-sessions.md also refers to the old option name.

The remote sessions guide told users to enable Mission Control remote
sessions with a client option named `remote` (TypeScript) / `Remote`
(Go, C#). No such option exists. It was renamed to
`enableRemoteSessions` / `EnableRemoteSessions` during the per-language
API reviews (#1343, #1357, #1360), none of which updated this guide. The
Rust (#1367) and Python (#1376) reviews did update their own tabs, which
is why those two were already correct.

As a result, the documented client construction does not compile in
TypeScript, Go or C#.

- Correct the option name in the section lead-in and in the TypeScript,
  Go and C# examples.
- Fix the Go example's return arity on the same line: NewClient returns
  a single value.
- Correct the Notes bullet, which named the same nonexistent option and
  also said the option applies only when the SDK spawns the CLI process.
  It is honored on both the child-process and in-process host paths.
Copilot AI review requested due to automatic review settings July 31, 2026 00:31
@examon
examon requested a review from a team as a code owner July 31, 2026 00:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Corrects remote-session client option names and Go client construction in the documentation.

Changes:

  • Updates TypeScript, Go, and C# option names.
  • Corrects Go’s NewClient return arity.
  • Clarifies runtime connection behavior.
Show a summary per file
File Description
docs/features/remote-sessions.md Corrects remote-session setup examples and notes.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@stephentoub
stephentoub added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 223436e Jul 31, 2026
30 checks passed
@stephentoub
stephentoub deleted the sdk-bugfix-37 branch July 31, 2026 10:53
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.

Remote sessions guide documents a client option that does not exist

3 participants