Remote Sessions
Remote sessions let you access the same Copilot session from GitHub web and mobile via Mission Control. When enabled, the SDK connects each session to Mission Control and issues a URL that can be shared as a link or QR code. To run the session itself on GitHub-hosted infrastructure instead of locally or on your own server, use Cloud Sessions.Prerequisites
- The user must be authenticated (GitHub token or logged-in user)
- The session’s
workingDirectorymust be a GitHub repository
Always-on (client-level)
Whenremote: true is set, every session in a GitHub repository automatically gets a remote URL.
Rather than hardcoding this in config/copilot.php, a more flexible approach is to enable remote: true only when calling useStdio() for the specific operation that needs it.
The
remote option only applies when the SDK spawns the CLI process. It is stdio mode only and is ignored when connecting to an external server via useTcp().On-demand (per-session toggle)
To start sharing mid-session, toggle remote access via RPC. This is equivalent to the CLI’s/remote on and /remote off commands.
Runtime-wide Remote Control (TCP mode)
Theremote: true option applies when the SDK spawns the CLI process, so it only works in stdio mode. When you connect to an existing CLI server in TCP mode, Copilot CLI ignores this option.
In TCP mode, use $client->rpc()->sessions() to manage a single Remote Control for the whole runtime. Unlike the per-session remote()->enable(), these methods let you start, stop, and transfer Remote Control between sessions, and read its current status.
off, connecting, active, or error. When the status is active, you can also read frontendUrl and isSteerable.
QR code generation
Render the remote URL as a QR code for easy mobile access. BaconQrCode, which is also used by Laravel Fortify, works well here.Notes
- The
remoteoption only applies when the SDK spawns the CLI process. It is ignored when connecting to an external server viauseTcp(). - If the working directory is not a GitHub repository, remote setup is silently skipped in always-on mode. In on-demand mode (
remote()->enable()), this may return an error. - Ensure authentication is configured correctly (
github_tokenoruse_logged_in_user).
See also
For the latest updates, see the GitHub repository.