Copilot ignoring whitelist and 'Allow x in this Session/Workspace' disabled #188799
Replies: 2 comments 3 replies
-
|
What you’re seeing is expected behavior right now. Copilot’s terminal tool approval system is still pretty restrictive. The chat.tools.terminal.autoApprove entries in settings.json don’t always override the approval prompt because Copilot still requires manual approval for many commands during a session. In other words, the setting is more of a hint than a guaranteed bypass. A couple of things that can affect it: Copilot Business policies – organizations can restrict automatic tool execution. If your company admin has tighter policies enabled, Copilot may force manual approval regardless of your local settings. Session-level permissions – the options like “Enable in this Session/Workspace” appear only when Copilot considers the command eligible. If the command isn’t on its allowlist, those options will stay greyed out. Terminal safety rules – even common commands like linters may still trigger approval because they involve shell execution. Unfortunately there isn’t currently a granular “approve safe commands automatically” mode. It’s basically: manual approvals or full auto-approve (“YOLO mode”) If this is happening frequently with things like linters, formatters, or test commands, the best workaround right now is to run those tasks through VS Code tasks, npm scripts, or Makefiles, and have Copilot call those instead. If GitHub adds per-command auto approval or trusted command lists, that would solve this problem much better than the current all-or-nothing approach. |
Beta Was this translation helpful? Give feedback.
-
|
I worked this out by trial-and-error. It seems there's some setting which had broken this in my I'm going to close this discussion now. Hopefully this fix will help someone else in the future! |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
Copilot Agent Mode
Body
When Copilot wants to run a script, I have to press Approve. I don't want to always press approve when it's just running the linter for the 10th time this session.
There is now a dropdown which gives me the option of 'Allow Auto Approve...' - but I don't want YOLO mode. There's already a load of things set by default in my
chat.tools.terminal.autoApproveCode/User/settings.json- but it seems to be ignoring them. I also sometimes see a list of other commands in that list like 'Enable x in this Session/Workspace' - but they don't always show, and when they are shown are greyed out. The only one I can interact with seems to be YOLO mode (Enable Auto Approve...)I can't seem to find any information about this problem by Googling - all I see is people (foolishly) asking for YOLO mode. I am not looking for that - I am just looking to get Copliot working in a 'normal' way - where well understood commands can be run without me having to press 'Approve' every 10 seconds.
My Copilot license is through my company, which has a 'Business' NOT 'Enterprise' license. I am wondering if there's an org level 'Enable tool auto-approve' that I need a manager to switch on? But if there is, I can't find any help about what it might be called! (Again, I don't want YOLO mode! Just normal mode!)
Enable terminal auto approve
There's a chance my problem is just to do with the messages being misleading? The
Enable terminal auto approve?dialog Says:If this is YOLO mode - then it wouldn't have a configurable subset of commands. So it isn't YOLO mode? Its using the whitelist? But if its using the whitelist - that is not a 'best effort protection'. That's a whitelist - which is fine - I'll just only whitelist commands that aren't dangerous?...
Beta Was this translation helpful? Give feedback.
All reactions