You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, forcing user to open entire system to information leakage #311898
v1.117 breaks per-workspace opt-in because the per-workspace setting does not persist after workspace restart. (Remember that v1.116 forced AI to be enabled on a system basis, breaking the ability to opt-in AI on a per-workspace basis; see #310143 .)
Open Workspace 1 in a VS Code instance. (This workspace has never been used with GitHub Copilot.)
Ctrl+X to bring up installed extensions.
Search for "GitHub Copilot Chat".
Right-click and select "Disable AI Features. (Optional: Restart by closing and opening Workspace 1 in a VS Code instance.)
Open Workspace 2 in a separate VS Code instance. (This workspace has a long history of AI.)
Ctrl+X to bring up installed extensions.
Search for "GitHub Copilot Chat".
Right-click and select "Enable AI Features (Workspace)".
The previous chat history appears in the side panel.
Close the VS Code instance.
Reopen Workspace 2 in a separate VS Code instance.
Expected: The side chat panel continues to show the ongoing chat history.
Actual: The side chat panel is blank. AI features have been toggled back off for that workspace.
Bug: Restarting the session discards the "Enable AI Features (Workspace)" setting; it is not persisted.
Workaround: Each time an AI workspace is loaded, manually reenable AI. Unfortunately there is no workaround, because GitHub Copilot does not function correctly if not enabled when VS Code starts, due to #312610.
Note that I am relying on per-workspace storage in C:\Users\user\AppData\Roaming\Code\User\workspaceStorage. I do not have a separate .vscode for the workspace. This should make no difference.
As you know security issues should have high priority. I'm asking because there should have been a fix already, but there has been no acknowledgement at all on this ticket; I wonder if the system/bot swept it under the rug somehow.
This bug has other serious ramifications: if GitHub Copilot is not enabled when the workspace is opened (i.e. if I enable it after opening the workspace, as this bug is forcing me to do), then new sessions never show up in the sessions list! I have filed #312610 , as that must be some other race condition that checks the GitHub Copilot status upon startup but never updates it. Nevertheless, that bug is severely compounded by this bug.
changed the title [-][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117[/-][+][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, opening entire system to information leakage[/+]on Apr 29, 2026
changed the title [-][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, opening entire system to information leakage[/-][+][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, forcing user to open entire system to information leakage[/+]on Apr 29, 2026
I have found a workaround! It appears that although the mechanism for persisting the GitHub Copilot Chat extension enabled status on a per-workspace basis is broken, but one can still opt-in by overriding chat.disableAIFeatures to falsein per-workspace settings.
The trick is that you have to do this manually in the settings.json file; it cannot be done inside the settings UI, because the Boolean checkbox is by default turned off. They made the chat.disableAIFeatures an opt-out feature rather than an opt-in feature, so there is no way for the UI to distinguish between "not set" or "unset". 🤦 Thus it has to be explicitly set to the desired value in the per-workspace settings.json file.
This issue could be mitigated with a tri-state checkbox in the settings UI. It wouldn't need to be mitigated if chat.disableAIFeatures had been made opt-in instead of opt-out, as security best-practices advocate. (After all, even an opt-in mechanism could be enabled opted-in system-wide if the user desires. Making a backwards Boolean settings flag to set to false to mean "enabled" is quintessential bad design.) And of course if the GitHub Copilot Chat extension enabled status persistence mechanism weren't broken, that approach would work as well. So this entire workaround is required because of a security-averse design coupled with a backwards setting naming decision on top of an anemic UI on top of a broken extension disable/enable persistence mechanism.
Here is the workaround:
In the global (user) settings, check chat.disableAIFeatures or set "chat.disableAIFeatures": true in the user settings.json file. Shortcut: Command Preferences: Open User Settings (JSON).
For per-folder workspaces, add "chat.disableAIFeatures": false to .vscode/settings.json. For multi-root workspaces, add "chat.disableAIFeatures": false to the "settings" section in .code-workspace or project.code-workspace. Shortcut: Command Preferences: Open Workspace Settings (JSON).
… can use help in testing it if you're interested.
Dmitriy Vasyura (@dmitrivMS) I appreciate your reply on this ticket and some attention to this security-related issue. I will certainly test this when it is available. However as I continually note, I waste enough time reporting and explaining significant bugs every time a new version comes out; I can't afford to waste more time with the overhead of installing and wading through the problems in a half-baked nightly version.
The larger issue puzzles me: Why is there anything that is so strange about this issue that it needs my specific testing? Shouldn't all VS Code extensions have the ability to be enabled or disabled on a per-workspace basis? If this general, foundational VS Code capability is broken, it would extend to more than just this one extension; surely your test suite should have already caught this fundamental problem, and could easily see when it was fixed.
Is the VS Code GitHub Copilot Chat extension some special, exceptional case that uses some quickly thrown-together kludge for enabling/disabling? Does it have some special, tightly coupled integration with VS Code that somehow behaves differently than other extensions? (If I had to bet …) If so, the true causes run deeper, and this will be the source of other maintenance and security snarls in the future for sure.
Garret Wilson (@garretwilson) First of all, thank for your time reporting and detailing the issues! By all means, we'll test the changes ourselves, I simply wanted to offer in case you are interested, but this is by no means required.
Regarding extension integration - yes, it is complicated in how it integrates, but in this specific case we want the extension to be disabled when the setting is set and vice versa which probably led some of the issues with the setting.
One thing that worries me is that all the work on this seems to have been done ad-hoc, with no specification of how this is supposed to work. You've already noted that there is some special interaction between the plugin state and the "disable AI" setting value;
The plugin state is tied to the "disable AI" setting value.
Both settings can be set both at a system level and at a workspace level
The workspace setting can be persisted in several locations:
C:\Users\user\AppData\Roaming\Code\User\workspaceStorage (on Windows)
A .vscode/settings.json file.
A .code-workspace file.
How is it possible to write tests for this when it isn't clear what the behavior should be?
For example, if I do not use a .vscode directory for a workspace, but rely on the user workspace settings folder (e.g. C:\Users\user\AppData\Roaming\Code\User\workspaceStorage for workspace settings; does per-worskpace enabling still work?
What if for one workspace I already have a .vscode directory; does disabling the plugin set chat.disableAIFeatures in .vscode or in C:\Users\user\AppData\Roaming\Code\User\workspaceStorage?
What if I have chat.disableAIFeatures set in a .code-workspace, but then I enable the plugin globally? Does it suddenly change my per-workspace value in .code-workspace?
What if the plugin is disabled per-workspace in C:\Users\user\AppData\Roaming\Code\User\workspaceStorage, but then I enable the plugin globally? Does it suddenly change my per-workspace value in C:\Users\user\AppData\Roaming\Code\User\workspaceStorage, so that a workspace that has been opted out suddenly enables AI gain? I have seen this sort of thing happen.
This is a critical area of security. Does GitHub Copilot have a written specification of how these settings interact (so that developers even know what the behavior should be), combined with a robust set of tests for edge and corner cases? If not this this is quintessentially bad security practices.
Activity
garretwilson commentedon Apr 24, 2026
TylerLeonhardt have you reviewed this ticket?
Benjamin Pasero (@bpasero) and Sandeep Somavarapu (@sandy081), since you were both involved with #310143 (the source of this issue), can you acknowledge this problem and verify that it will be addressed quickly?
As you know security issues should have high priority. I'm asking because there should have been a fix already, but there has been no acknowledgement at all on this ticket; I wonder if the system/bot swept it under the rug somehow.
garretwilson commentedon Apr 26, 2026
This bug has other serious ramifications: if GitHub Copilot is not enabled when the workspace is opened (i.e. if I enable it after opening the workspace, as this bug is forcing me to do), then new sessions never show up in the sessions list! I have filed #312610 , as that must be some other race condition that checks the GitHub Copilot status upon startup but never updates it. Nevertheless, that bug is severely compounded by this bug.
[-][severe] GitHub Copilot per-workspace enablement doesn't persist in v1.117[/-][+][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117[/+]garretwilson commentedon Apr 29, 2026
This is still broken in v1.118, forcing a user to leave an entire system open to information leakage. TylerLeonhardt , Benjamin Pasero (@bpasero) , Sandeep Somavarapu (@sandy081)
[-][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117[/-][+][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, opening entire system to information leakage[/+][-][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, opening entire system to information leakage[/-][+][severe; security] GitHub Copilot per-workspace enablement doesn't persist in v1.117+, forcing user to open entire system to information leakage[/+]garretwilson commentedon May 4, 2026
I have found a workaround! It appears that although the mechanism for persisting the GitHub Copilot Chat extension enabled status on a per-workspace basis is broken, but one can still opt-in by overriding
chat.disableAIFeaturestofalsein per-workspace settings.The trick is that you have to do this manually in the
settings.jsonfile; it cannot be done inside the settings UI, because the Boolean checkbox is by default turned off. They made thechat.disableAIFeaturesan opt-out feature rather than an opt-in feature, so there is no way for the UI to distinguish between "not set" or "unset". 🤦 Thus it has to be explicitly set to the desired value in the per-workspacesettings.jsonfile.This issue could be mitigated with a tri-state checkbox in the settings UI. It wouldn't need to be mitigated if
chat.disableAIFeatureshad been made opt-in instead of opt-out, as security best-practices advocate. (After all, even an opt-in mechanism could be enabled opted-in system-wide if the user desires. Making a backwards Boolean settings flag to set tofalseto mean "enabled" is quintessential bad design.) And of course if the GitHub Copilot Chat extension enabled status persistence mechanism weren't broken, that approach would work as well. So this entire workaround is required because of a security-averse design coupled with a backwards setting naming decision on top of an anemic UI on top of a broken extension disable/enable persistence mechanism.Here is the workaround:
chat.disableAIFeaturesor set"chat.disableAIFeatures": truein the usersettings.jsonfile. Shortcut: CommandPreferences: Open User Settings (JSON)."chat.disableAIFeatures": falseto.vscode/settings.json. For multi-root workspaces, add"chat.disableAIFeatures": falseto the"settings"section in.code-workspaceorproject.code-workspace. Shortcut: CommandPreferences: Open Workspace Settings (JSON)..vscode/settings.json{ …, "chat.disableAIFeatures": false }.code-workspace{ "folders": [ …, ], "settings": { …, "chat.disableAIFeatures": false } }dmitrivMS commentedon May 5, 2026
Garret Wilson (@garretwilson) I have a draft here, can use help in testing it if you're interested.
garretwilson commentedon May 5, 2026
Dmitriy Vasyura (@dmitrivMS) I appreciate your reply on this ticket and some attention to this security-related issue. I will certainly test this when it is available. However as I continually note, I waste enough time reporting and explaining significant bugs every time a new version comes out; I can't afford to waste more time with the overhead of installing and wading through the problems in a half-baked nightly version.
The larger issue puzzles me: Why is there anything that is so strange about this issue that it needs my specific testing? Shouldn't all VS Code extensions have the ability to be enabled or disabled on a per-workspace basis? If this general, foundational VS Code capability is broken, it would extend to more than just this one extension; surely your test suite should have already caught this fundamental problem, and could easily see when it was fixed.
Is the VS Code GitHub Copilot Chat extension some special, exceptional case that uses some quickly thrown-together kludge for enabling/disabling? Does it have some special, tightly coupled integration with VS Code that somehow behaves differently than other extensions? (If I had to bet …) If so, the true causes run deeper, and this will be the source of other maintenance and security snarls in the future for sure.
dmitrivMS commentedon May 5, 2026
Garret Wilson (@garretwilson) First of all, thank for your time reporting and detailing the issues! By all means, we'll test the changes ourselves, I simply wanted to offer in case you are interested, but this is by no means required.
Regarding extension integration - yes, it is complicated in how it integrates, but in this specific case we want the extension to be disabled when the setting is set and vice versa which probably led some of the issues with the setting.
dmitrivMS commentedon May 9, 2026
This was fixed by #314744
garretwilson commentedon May 9, 2026
Thank you for your work on this Dmitriy Vasyura (@dmitrivMS) .
One thing that worries me is that all the work on this seems to have been done ad-hoc, with no specification of how this is supposed to work. You've already noted that there is some special interaction between the plugin state and the "disable AI" setting value;
C:\Users\user\AppData\Roaming\Code\User\workspaceStorage(on Windows).vscode/settings.jsonfile..code-workspacefile.How is it possible to write tests for this when it isn't clear what the behavior should be?
.vscodedirectory for a workspace, but rely on the user workspace settings folder (e.g.C:\Users\user\AppData\Roaming\Code\User\workspaceStoragefor workspace settings; does per-worskpace enabling still work?.vscodedirectory; does disabling the plugin setchat.disableAIFeaturesin.vscodeor inC:\Users\user\AppData\Roaming\Code\User\workspaceStorage?chat.disableAIFeaturesset in a.code-workspace, but then I enable the plugin globally? Does it suddenly change my per-workspace value in.code-workspace?C:\Users\user\AppData\Roaming\Code\User\workspaceStorage, but then I enable the plugin globally? Does it suddenly change my per-workspace value inC:\Users\user\AppData\Roaming\Code\User\workspaceStorage, so that a workspace that has been opted out suddenly enables AI gain? I have seen this sort of thing happen.This is a critical area of security. Does GitHub Copilot have a written specification of how these settings interact (so that developers even know what the behavior should be), combined with a robust set of tests for edge and corner cases? If not this this is quintessentially bad security practices.