[BUG] VS Code extension: in multi-root workspaces, a tool-level `Bash` allow rule is ignored for git commands only
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I open my project via a multi-root .code-workspace file, the VS Code extension prompts for permission on every git command that isn't covered by an explicit Bash(git …) rule — even though my project .claude/settings.json has a tool-level "Bash" allow rule that /permissions confirms is loaded. The same blanket rule works for every _non_-git command in the same session (reads and writes alike), and works for _all_ commands when I open the same repo as a single folder with code .. Same settings files, same repo — only the launch mode and the git prefix change the outcome.
What Should Happen?
A tool-level Bash allow rule should apply to git commands the same as any other command, regardless of whether the window was opened as a single folder or from a .code-workspace file.
Error Messages/Logs
No errors — just permission prompt dialogs. /permissions shows all 34 expected allow rules active (26 user + 8 project, including the bare `Bash` rule).
Steps to Reproduce
- Project
.claude/settings.json:{ "permissions": { "allow": ["Bash"] } }. User~/.claude/settings.jsonhas explicit read-only git rules (Bash(git log:*),Bash(git diff:*),Bash(git status),Bash(git show:*),Bash(git branch:*)). - Create a
.code-workspacefile one directory above the repo listing the repo plus two sibling folders; open it and start a Claude Code session in the extension. - Ask Claude to run
uname -r,touch probe.tmp,rm probe.tmp→ all auto-run (blanket rule works, including writes). - Ask Claude to run
git log -1→ auto-runs (explicit user rule). - Ask Claude to run
git checkout -b test,git add -A,git commit -m x,git push, orgit -C <repo> status→ each one prompts. - Close the window, open the repo directly with
code ., repeat step 5 → no prompts.
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
unknown
Claude Code Version
2.1.159 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Notes
- Read-vs-write ruled out:
touch/rmin the repo root auto-run. - Path arguments ruled out:
git -C <primary root> statusprompts while
touch <primary root>/x doesn't.
- The behavior is specific to commands starting with
gitthat don't match
an explicit Bash(git …) rule, and only under multi-root launch.
Related (not duplicates)
- #30321 — repeated git prompts in the extension (closed; no multi-root or
blanket-rule angle)
- #37107 — multi-root prompts for Edit paths
- #57243 — multi-root config loading limited to primary folder
- #33595 / #18160 — allow rules ignored, not launch-mode-conditional