[BUG] VS Code extension: in multi-root workspaces, a tool-level `Bash` allow rule is ignored for git commands only

Status Open
Reported on v2.1.159
Maintainer reply None cached
Activity 0 comments · opened Jul 21, 2026

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

  1. Project .claude/settings.json{ "permissions": { "allow": ["Bash"] } }. User ~/.claude/settings.json has explicit read-only git rules (Bash(git log:*)Bash(git diff:*)Bash(git status)Bash(git show:*)Bash(git branch:*)).
  2. Create a .code-workspace file one directory above the repo listing the repo plus two sibling folders; open it and start a Claude Code session in the extension.
  3. Ask Claude to run uname -rtouch probe.tmprm probe.tmp → all auto-run (blanket rule works, including writes).
  4. Ask Claude to run git log -1 → auto-runs (explicit user rule).
  5. Ask Claude to run git checkout -b testgit add -Agit commit -m xgit push, or git -C <repo> status → each one prompts.
  6. 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/rm in the repo root auto-run.
  • Path arguments ruled out: git -C <primary root> status prompts while

touch <primary root>/x doesn't.

  • The behavior is specific to commands starting with git that 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

View original on GitHub ↗