Repository navigation
Description
Users may have some workspaces used with GitHub Copilot, but also have other sensitive workspaces for which under no circumstances must any local information be sent to an LLM. VSCode v.116 has broken the ability to opt-in to GitHub Copilot AI, and instead forced sensitive workspaces to opt-out of GitHub Copilot AI. This is not workable and against security best practices. Now VS Code exposes a system to inadvertently leaking information in arbitrary directories.
Expected: Before v1.116 I could disable GitHub Copilot globally, and only enable it on a per-workspace basis. I would do this by disabling the plugin globally, and then selecting "enable (workspace)" only in each workspace for which I wanted to use GitHub Copilot. This is referred to as "opt-in". This is security best practices: I should not be required to hunt down all my sensitive workspaces and opt them out. Instead, I should be allowed to only opt-in workspaces that I want to use with AI.
Actual: In v1.116 GitHub Copilot is built-in. There is now only a single chat.disableAIFeatures setting which allows the user to turn off AI either globally, or on a per-workspace basis. The plugin no longer has an option to enable it on a per-workspace basis, because the plugin is now built in. Although it appears I can disable AI, for one particular workspace, this is an "opt-out" paradigm which is extremely insecure.
Discussion
Imagine if a user has 10 sensitive directories (e.g. bank statements, love letters, the formulas for secret sauces). Some of them may not even have VS Code workspace yet, as VS Code automatically creates workspaces when a directory is opened. It is unacceptable, intrusive, and unreasonable that the user must go into each of these 10 sensitive directories, create VS Code workspaces for them, and then opt them out. What if the user forgets a directory? Plus the user has to open VS Code in that directory opt them out!
Implications: Abandoning VS Code
The lack of an opt-in mechanism is simply too great of a security risk. I cannot expose all my system to the possibility of inadvertently sending information to LLMS from sensitive directories. If VS Code is removing its AI opt-in feature, I will be removing VS Code as my default editor.
VS Code is not secure unless it brings back an opt-in feature for AI. I will not expose my entire system to an information-leaking security risk.
Activity
garretwilson commentedon Apr 15, 2026
To add insult to injury, if you disable AI for a particular workspace using
"chat.disableAIFeatures": true, if the workspace is restricted (the secure mode) then every time you try to open that workspace, VS Code nags you trust the folder (i.e. to make the workspace less secure) in order to disable AI!Apparently it sees a feature related to AI and warns of a security risk, even though the AI "feature" is the option to turn off AI!
This is a secondary issue. However it illustrates two things:
I reiterate: VS Code must have an AI opt-in mechanism, not an opt-out mechanism.
bpasero commentedon Apr 16, 2026
Garret Wilson (@garretwilson) the intent was not to break this scenario but preserve the ability to allow to globally disable the extension and then enable it on a per-workspace.
However it turns out that the action appears disabled, which is clearly a bug:
You can still configure
chat.disableAIFeaturesas a workspace setting and that will work, but its not the ideal solution.Thanks for the report, we will fix this asap.
fix #310143
sandy081 commentedon Apr 16, 2026
Verification Steps:
@builtin chat@builtin chatfix microsoft#310143 (microsoft#310840)
garretwilson commentedon Apr 22, 2026
No, this is still broken in v1.117, because the workspace opt-in setting don't persist. I have filed ticket #311898.
Sandeep Somavarapu (@sandy081) it appears that your verification steps were missing these:
Benjamin Pasero (@bpasero), this needs to be fixed immediately, and a new out-of-band hotfix release should be made for it. In fact the original issue should have been taken as higher priority and a hotfix released for it as well.