Skip to main content

Remote sessions

Let users access their Copilot session from GitHub web and mobile by connecting the session to Mission Control.

누가 이 기능을 사용할 수 있나요?

GitHub Copilot SDK 는 모든 Copilot 계획에서 사용할 수 있습니다.

참고

코필로트 SDK가 현재 공개 미리 보기에 있습니다. 기능 및 가용성은 변경될 수 있습니다.

Remote sessions let users access their Copilot session from GitHub web and mobile. When enabled, the 코필로트 SDK connects each session to Mission Control, producing a URL that can be shared as a link or QR code.

Prerequisites

  • The user must be authenticated (GitHub token or logged-in user)
  • The session's working directory must be a GitHub repository

Enabling remote sessions

You can enable remote access at the client level (always-on) or toggle it per session (on-demand).

Always-on (client-level)

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

import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient({ remote: true });
const session = await client.createSession({
  workingDirectory: "/path/to/github-repo",
  onPermissionRequest: async () => ({ allowed: true }),
});

session.on("session.info", (event) => {
  if (event.data.infoType === "remote") {
    console.log("Remote URL:", event.data.url);
  }
});

For examples in Python, Go, C#, and Rust, see the github/copilot-sdk repository. Java의 경우 리포지토리를github/copilot-sdk-java 참조하세요.

On-demand (per-session toggle)

Use session.rpc.remote.enable() to start remote access mid-session, and session.rpc.remote.disable() to stop it. This is equivalent to 코파일럿 CLI's /remote on and /remote off commands.

const result = await session.rpc.remote.enable();
console.log("Remote URL:", result.url);

// Later: stop sharing
await session.rpc.remote.disable();

For examples in Python, Go, C#, and Rust, see the github/copilot-sdk repository. Java의 경우 리포지토리를github/copilot-sdk-java 참조하세요.

QR code generation

The remote URL can be rendered as a QR code for easy mobile access. The 코필로트 SDK provides the URL—use your preferred QR code library.

Notes

  • The remote client option only applies when the 코필로트 SDK spawns 코파일럿 CLI. It is ignored when connecting to an external server via cliUrl.
  • 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.