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
Selected model: any, tested with GPT 5.5 and Opus 4.x
chat.tools.terminal.autoApprove does not auto-approve git diff -- <path>
Description
A chat.tools.terminal.autoApprove rule for git diff auto-approves git diff <path>, but the equivalent Git command using the pathspec separator, git diff -- <path>, still asks for approval.
Since plain auto-approve entries are converted to prefix matches, "git diff": true appears expected to match both forms. This looks like the terminal command parser may be splitting or classifying the bare -- form differently before rule matching.
Steps to Reproduce
On Windows with PowerShell as the integrated terminal shell, enable terminal auto-approval.
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.124.2. Please try upgrading to the latest version and checking whether this issue remains.
I am also encountering this issue on 1.125.1
I don't think it's isolated to just git diff either. I've encountered it with various other commands as well.
I debugged this issue and found that tree-sitter-powershell fails to parse a bare -- token, producing a parse error (ERROR node).
This looks like the same class of issue as #294010, and I believe it can be fixed the same way (masking the token before parsing).
The problem appears to be caused by the PowerShell tree-sitter grammar treating a standalone -- as a parse error. I added a workaround that masks the token before parsing.
Activity
vs-code-engineering commentedon Jun 17, 2026
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.124.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
stmax82 commentedon Jun 22, 2026
Yes it still happens in 1.125.1.
ckchessmaster commentedon Jun 22, 2026
I am also encountering this issue on 1.125.1
I don't think it's isolated to just git diff either. I've encountered it with various other commands as well.
grebdioZ commentedon Aug 28, 2026
It happens to me all the time, and for ages, and still with the latest version 1.134.0.
Does anyone know any workarounds other than blank auto-approve?
iket0731 commentedon Aug 31, 2026
I debugged this issue and found that
tree-sitter-powershellfails to parse a bare--token, producing a parse error (ERROR node).This looks like the same class of issue as #294010, and I believe it can be fixed the same way (masking the token before parsing).
iket0731 commentedon Sep 7, 2026
Hi Anthony Kim (@anthonykim1), I have a local fix for this issue. May I open a PR for it?
The problem appears to be caused by the PowerShell tree-sitter grammar treating a standalone
--as a parse error. I added a workaround that masks the token before parsing.Fix PowerShell parsing for standalone `--` tokens
Fix PowerShell parsing for standalone `--` tokens