Many developers run both VS Code Stable and VS Code Insiders on the same machine. The goal is to test cutting-edge features in Insiders while keeping Stable as your daily driver. But when you install GitHub Copilot in both versions, settings and extension data can collide. This article explains how to configure separate GitHub Copilot instances so Insiders does not corrupt your Stable environment.
GitHub Copilot shares its extension storage and authentication tokens across all VS Code instances by default. When you sign in on Insiders, it can overwrite the token from Stable. This causes Stable to lose its connection or use the wrong user account. The fix involves isolating the extension data and settings for each VS Code flavor.
You will learn how to set distinct data directories for Insiders, how to prevent settings sync from mixing configurations, and which Copilot settings to duplicate or avoid. After following these steps, you can run Copilot in both versions simultaneously without any side effects.
Key Takeaways: Isolating GitHub Copilot Between VS Code Stable and Insiders
- VS Code Insiders command-line flag
--user-data-dir: Forces Insiders to use a separate folder for all user data, including Copilot tokens and settings. - Settings Sync exclusion for Copilot: Disable syncing of the
github.copilotnamespace to prevent Stable settings from overwriting Insiders settings. - Separate GitHub account sign-in per instance: Each VS Code version stores its own authentication token when using isolated data directories, avoiding token conflicts.
Why GitHub Copilot Breaks When You Use Both VS Code Versions
GitHub Copilot stores its authentication token, extension state, and user preferences inside the VS Code user data directory. By default, both VS Code Stable and VS Code Insiders point to the same user data folder. On Windows, this is %APPDATA%\Code for Stable and %APPDATA%\Code - Insiders for Insiders. On macOS, the paths are ~/Library/Application Support/Code and ~/Library/Application Support/Code - Insiders. While the folders are different, VS Code Insiders can still read and write to the Stable folder if you launch it without the --user-data-dir flag or if you use Settings Sync.
The most common conflict happens when Settings Sync is enabled. If you sign into the same GitHub account on both versions, Settings Sync merges the github.copilot settings. This can cause the Insiders version to pick up a token that was meant for Stable, or vice versa. The result is that Copilot stops working in one version, or it uses the wrong account.
Another conflict occurs when the Copilot extension updates itself. Both versions share the same extension cache on some operating systems. An update downloaded by Insiders can replace the Stable extension version, which may introduce breaking changes before Stable is ready.
Steps to Configure Separate GitHub Copilot Environments
The following method uses the VS Code Insiders command-line flag --user-data-dir to create a completely separate workspace for Insiders. This approach isolates all extension data, settings, and authentication tokens.
- Create a dedicated user data folder for Insiders
Open a terminal or File Explorer. Create a new folder namedvscode-insiders-datain a location of your choice. Example on Windows:C:\Users\YourName\vscode-insiders-data. On macOS or Linux:~/vscode-insiders-data. This folder will store all Insiders-specific settings, extensions, and Copilot tokens. - Modify the VS Code Insiders shortcut or launch command
Add the--user-data-dirflag to the launch command. For a shortcut, right-click the VS Code Insiders icon, select Properties, and add the flag to the Target field. Example target:"C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe" --user-data-dir "C:\Users\YourName\vscode-insiders-data". On macOS, edit the.commandfile or use the terminal:open -a "Visual Studio Code - Insiders" --args --user-data-dir ~/vscode-insiders-data. - Launch VS Code Insiders with the new data folder
Start Insiders using the modified shortcut or terminal command. VS Code will create the folder structure automatically. You will see a fresh installation with no extensions or settings. - Install GitHub Copilot in Insiders
Open the Extensions view by pressing Ctrl+Shift+X. Search for GitHub Copilot and install it. Also install GitHub Copilot Chat if you use it. Since the data folder is isolated, this extension is separate from the Stable installation. - Sign in to GitHub Copilot in Insiders
After installation, click the Copilot icon in the status bar or open the Command Palette with Ctrl+Shift+P and run GitHub Copilot: Sign In. Complete the authentication flow. This token is stored only in the new data folder and will not affect Stable. - Disable Settings Sync for Copilot settings in both versions
In Stable, open Settings Sync by clicking the gear icon in the lower left and selecting Turn on Settings Sync. If already enabled, click the gear icon again and choose Configure Synced Settings. Under Extensions, find GitHub Copilot and toggle it off. Repeat the same process in Insiders. This prevents thegithub.copilotsettings from being shared between the two instances. - Verify isolation
Open Copilot in both Stable and Insiders. Type a comment like// test copilotand press Enter. Copilot should suggest completions in both versions. Check the status bar icon: it should show a checkmark and the active account name. If Stable shows a different account than Insiders, the isolation is working.
If Copilot Still Has Issues After the Main Fix
Copilot shows “Sign in” again in Stable after using Insiders
This happens if the Insiders instance was launched without the --user-data-dir flag at least once. The Insiders instance may have overwritten the Stable token. To fix this, re-sign into Stable. Then ensure the Insiders shortcut always includes the --user-data-dir flag. Delete any old Insiders user data folders that might have been created accidentally, such as %APPDATA%\Code - Insiders on Windows, after backing up any custom settings you need.
Settings Sync still merges Copilot settings
If you previously synced settings before disabling Copilot sync, the old settings may still be in the cloud. Clear the synced data by going to Settings Sync in both versions, selecting Turn Off Settings Sync, and then choosing the option to clear synced data. Then re-enable Settings Sync with Copilot excluded. Alternatively, use the command Preferences: Sync: Turn Off and Clear Data from the Command Palette.
Copilot extension shows different version numbers
This is normal when using isolated data directories. Each version updates independently. However, if you see an error about an incompatible extension version, check that both VS Code Stable and Insiders are updated to their latest builds. Open the Help menu and select Check for Updates on each version. If the problem persists, uninstall and reinstall Copilot in the affected version.
VS Code Stable vs VS Code Insiders for GitHub Copilot: Key Differences
| Item | VS Code Stable | VS Code Insiders |
|---|---|---|
| Release frequency | Monthly stable builds | Nightly builds with latest features |
| Copilot stability | Fully tested and reliable | May include unreleased Copilot features that are less stable |
| Default user data folder | %APPDATA%\Code (Windows) or ~/Library/Application Support/Code (macOS) |
%APPDATA%\Code - Insiders (Windows) or ~/Library/Application Support/Code - Insiders (macOS) |
| Settings Sync default | Enabled after sign-in | Enabled after sign-in |
| Recommended isolation method | Not needed | --user-data-dir flag with a custom folder |
| Copilot token storage | Inside user data folder | Inside custom user data folder if flag is used |
This table shows that the main difference is the user data folder path. Without the --user-data-dir flag, Insiders uses its own default folder, but Settings Sync can still cause conflicts. The custom folder approach is the only way to guarantee full isolation.
You can now run GitHub Copilot in both VS Code Stable and VS Code Insiders without any cross-contamination. The key step is the --user-data-dir flag on the Insiders launch command. Next, consider setting up separate workspace settings for each version to further customize Copilot behavior. An advanced tip: you can create a batch script or shell alias that launches Insiders with the flag automatically, so you never forget to include it.