Repository navigation
Description
chat.tools.terminal.autoApprove rules are not honored under "Default Approvals" for terminal commands like git diff
Summary
When Copilot Chat is in "Default Approvals" mode, terminal commands that are explicitly allowed by chat.tools.terminal.autoApprove still show the "Run pwsh command?" confirmation dialog instead of auto-running.
This makes chat.tools.terminal.autoApprove ineffective for the expected user scenario: allowing safe terminal commands without repeated prompts.
Environment
- VS Code: 1.127.0
- GitHub Copilot Chat / Copilot: 0.55.0
- OS: Windows 10 Pro
- Shell: PowerShell
- Chat permission mode: "Default Approvals"
Steps to Reproduce
Step 1. Configure chat.tools.terminal.autoApprove with an allow rule for git diff, for example:
"chat.tools.terminal.autoApprove": {
"/^git(\\s+(-C\\s+\\S+|--no-pager))*\\s+diff\\b/": true
}Step 2. In Copilot Chat, keep the permission mode set to "Default Approvals".
Step 3. Ask Copilot Chat to run this command:
git diff --unified=40 -- src/file1.go src/file2.go src/file3.goActual Result
A confirmation dialog appears:
- "Run pwsh command?"
- User must click "Allow" manually
Expected Result
Because the command matches an explicit allow rule in chat.tools.terminal.autoApprove, it should auto-run without showing the confirmation dialog while in "Default Approvals".
Additional Notes
- The command is safe/read-only and is exactly the kind of command users expect to whitelist via
chat.tools.terminal.autoApprove. - The command runs successfully after manual approval, so the problem is not command validity.
- From a user perspective, "Default Approvals" appears not to actually "use configured rules" for terminal commands in the expected way.
- This seems like either a regression or a behavior change that makes
chat.tools.terminal.autoApprovemuch less useful than before. Bypass Approvalsis not an acceptable workaround, because it auto-approves all tool calls, not only the commands explicitly allowed inchat.tools.terminal.autoApprove.
Why this is a problem
Users configure chat.tools.terminal.autoApprove specifically to avoid repeated prompts for safe commands such as git diff, git status, etc. If those commands still trigger the top-level approval dialog in "Default Approvals", the setting no longer provides the expected value.
Activity
anthonykim1 commentedon Jul 2, 2026
Roman Fetisov (@roma-fl) Can you please share the view of your agents picker? And if you are able to reproduce on the latest insiders Insiders build
roma-fl commentedon Jul 3, 2026
Tested on Insider Build: 1.128.0-insider (system setup). Same result:

roma-fl commentedon Jul 10, 2026
"Allow all commands in this session" also doesn't help, it still asks for confirmation for some "pwsh" commands.
Troyx21 commentedon Jul 13, 2026
I think I have the same issue. No combination of plain command prefix, regex, or object-style
matchCommandLinesyntax helps with following commands:The prompt about
pwshis always shown. It worked for the simple"npx eslint": truethough. I think it is a parsing issue withnpm exechaving double dashes. But strangely,matchCommandLinevariant did not work either. Please investigate thesenpm exec -- somecommandvariants as well. #325635Fix PowerShell parsing for standalone `--` tokens
Fix PowerShell parsing for standalone `--` tokens