How to Use GitHub Copilot With VS Code Live Share Sessions
🔍 WiseChecker

How to Use GitHub Copilot With VS Code Live Share Sessions

When you collaborate in real time using VS Code Live Share, your team can edit the same files from different machines. You may expect GitHub Copilot to assist everyone in the session, but the default behavior limits suggestions to the host only. This article explains how to configure Copilot so that all participants can receive inline code suggestions during a Live Share session. You will learn the prerequisites, the exact settings to adjust, and the limitations you should know about.

Key Takeaways: Enabling Copilot for All Live Share Participants

  • VS Code Live Share extension: Required on every participant machine to join a collaborative editing session.
  • GitHub Copilot extension: Each guest must install and sign in with their own Copilot subscription.
  • VS Code user setting "github.copilot.enable": Must be set to true in the workspace or user settings for Copilot to activate during a session.

How GitHub Copilot and Live Share Work Together

VS Code Live Share lets you share your workspace, terminal, and debugging session with other developers. When you start a Live Share session, the host’s VS Code instance broadcasts changes to guests. By default, GitHub Copilot runs only on the host machine and does not send suggestions to guests. This is because Copilot is a local extension that processes code context on the user’s machine.

To allow guests to receive Copilot suggestions, each guest must have the GitHub Copilot extension installed and activated. The host does not share their Copilot license. Each participant must have their own active Copilot subscription, either Copilot Individual, Copilot Business, or Copilot Enterprise. The guest’s Copilot instance will read the shared code context from the Live Share session and generate suggestions locally on the guest’s machine.

Prerequisites for Using Copilot in Live Share

Before you start, verify the following requirements are met on every machine that will participate in the session:

  • VS Code version 1.82 or later installed on all machines
  • Live Share extension pack installed on all machines
  • GitHub Copilot extension installed on all machines
  • Each participant signed in to GitHub Copilot with their own account that has an active subscription
  • All participants connected to the internet

Steps to Enable GitHub Copilot for All Live Share Participants

Follow these steps to configure Copilot so that every guest can see inline suggestions during a Live Share collaboration session.

  1. Install the required extensions on every machine
    Each participant must install both the Live Share extension and the GitHub Copilot extension from the VS Code marketplace. Open the Extensions view by pressing Ctrl+Shift+X, search for each extension, and click Install.
  2. Sign in to GitHub Copilot on each machine
    After installing the Copilot extension, open the Command Palette with Ctrl+Shift+P, type GitHub Copilot: Sign In, and follow the authentication flow. Each participant must use their own GitHub account that has an active Copilot subscription.
  3. Start a Live Share session from the host
    The host opens the workspace they want to share. Click the Live Share button in the status bar, or open the Command Palette and select Live Share: Start Collaboration Session. A link is generated that guests use to join.
  4. Join the session from each guest machine
    Each guest clicks the Live Share button in the status bar and selects Join Collaboration Session. They paste the link provided by the host. The guest’s VS Code now shows the shared files.
  5. Verify Copilot is active on the guest machine
    On the guest machine, open any file in the shared workspace. Start typing code. The Copilot icon in the status bar should show the Copilot logo. If it shows a crossed-out icon, click it and select Enable Completions.
  6. Adjust Copilot settings for the session if needed
    If Copilot suggestions do not appear, open the Command Palette and select Preferences: Open User Settings. Search for github.copilot.enable and confirm it is set to true. You can also set this in the workspace settings by opening the .vscode/settings.json file in the shared workspace and adding "github.copilot.enable": true.

What to Avoid When Using Copilot With Live Share

Even with the correct setup, several common mistakes can prevent Copilot from working properly in a Live Share session. Understanding these limitations will save you time during collaboration.

Copilot suggestions appear only for the host

This is the default behavior. If guests do not see suggestions, check that they have installed the Copilot extension and signed in with their own account. Guests cannot use the host’s Copilot subscription. Each guest must have their own.

Copilot does not suggest code in read-only files

Live Share allows the host to mark files as read-only. Guests cannot edit these files, and Copilot will not generate suggestions in them. The host should ensure that all files guests need to edit are writable. In the Live Share view, the host can right-click a file and select Make Writable.

Network restrictions block Copilot requests

GitHub Copilot requires outbound HTTPS access to api.github.com and copilot-proxy.githubusercontent.com. If a guest is behind a corporate firewall or VPN that blocks these endpoints, Copilot will not work. The guest should test Copilot outside of Live Share first to confirm network access.

Copilot uses the guest’s language model and context

Each guest’s Copilot instance generates suggestions based on the code visible in the Live Share session. The host’s local file context, such as open editors not shared, is not available to guests. Guests only see suggestions based on the files the host has shared and that the guest has opened.

Item Host with Copilot Guest with Copilot
Extension installation Required on host machine Required on guest machine
Copilot subscription Host’s own subscription Guest’s own subscription
Code context for suggestions Full local workspace plus shared files Only files shared and opened by guest
Ability to edit files Full write access Write access only to files marked writable
Copilot suggestions visibility Visible to host only Visible to guest only

After completing these steps, you can collaborate with your team while each member receives personalized Copilot suggestions. The key requirement is that every participant has their own Copilot subscription and the extension installed. To improve the experience further, ask the host to share the full workspace folder instead of individual files so that Copilot on guest machines has more context. As an advanced tip, you can set the "github.copilot.enable" setting in the workspace .vscode/settings.json file to force Copilot activation for all participants automatically when they open the shared workspace.