Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/features/remote-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For running sessions on GitHub-hosted compute, see [Cloud Sessions](./cloud-sess

### Always-on (client-level)

Set `remote: true` when creating the client. Every session in a GitHub repo automatically gets a remote URL.
Set `enableRemoteSessions: true` when creating the client. Every session in a GitHub repo automatically gets a remote URL.

<!-- tabs:start -->

Expand All @@ -23,7 +23,7 @@ Set `remote: true` when creating the client. Every session in a GitHub repo auto
```typescript
import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient({ remote: true });
const client = new CopilotClient({ enableRemoteSessions: true });
const session = await client.createSession({
workingDirectory: "/path/to/github-repo",
onPermissionRequest: async () => ({ allowed: true }),
Expand Down Expand Up @@ -59,7 +59,7 @@ session.on(on_event)

<!-- docs-validate: skip -->
```go
client, _ := copilot.NewClient(&copilot.ClientOptions{Remote: true})
client := copilot.NewClient(&copilot.ClientOptions{EnableRemoteSessions: true})
session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
WorkingDirectory: "/path/to/github-repo",
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
Expand All @@ -78,7 +78,7 @@ session.On(func(event copilot.SessionEvent) {

<!-- docs-validate: skip -->
```csharp
var client = new CopilotClient(new CopilotClientOptions { Remote = true });
var client = new CopilotClient(new CopilotClientOptions { EnableRemoteSessions = true });
var session = await client.CreateSessionAsync(new SessionConfig
{
WorkingDirectory = "/path/to/github-repo",
Expand Down Expand Up @@ -201,6 +201,6 @@ The remote URL can be rendered as a QR code for easy mobile access. The SDK prov

## Notes

* The `remote` client option only applies when the SDK spawns the CLI process. It is ignored when connecting to an external server via `cliUrl`.
* The `enableRemoteSessions` client option applies when the SDK starts the runtime, either as a child process or as an in-process host. It is ignored when connecting to an already-running runtime.
* If the working directory is not a GitHub repository, remote setup is silently skipped (always-on mode) or returns an error (on-demand mode).
* Remote sessions require authentication. Ensure `gitHubToken` or `useLoggedInUser` is configured.
Loading