[BUG] Windows: VS Code extension ignores project permissions.allow because workspace trust is keyed by drive-letter case (c: vs C:)

Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 0 comments · opened Oct 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [ ] I am using the latest version of Claude Code — reproduced with the VS Code extension 2.1.289 and the CLI 2.1.280. The 2.1.290 changelog has no related fix.

What's Wrong?

On Windows, the VS Code extension never applies permissions.allow rules from a project's .claude/settings.json. Every matching PowerShell command and every allow-listed MCP tool call still shows a permission prompt.

The cause looks like workspace trust in ~/.claude.json being looked up with a case-sensitive key, while the drive letter case differs by entry point:

  • The VS Code extension runs with the folder as c:\Users\me\repo (VS Code's lowercase drive letter), so it looks up projects["c:/Users/me/repo"]. Nothing in the extension set this key for me: every project I have only used from the VS Code extension has hasTrustDialogAccepted: false in ~/.claude.json, or no entry at all.
  • Accepting the trust dialog in the CLI started from PowerShell records projects["C:/Users/me/repo"], because PowerShell normalizes the drive letter to uppercase. After that, the VS Code extension still prompts for everything.
  • Adding hasTrustDialogAccepted: true under the lowercase key c:/Users/me/repo makes the VS Code extension apply the allow rules right away (no prompts in a new session).

2.1.286 fixed the same letter-case mismatch for claude --bg and the agents view ("refusing a folder that claude already trusts when its trust record was saved with different letter case"). The project allow rules path seems to still compare the key case-sensitively.

What Should Happen?

  • Trust lookup on Windows should ignore the case of the drive letter, so a folder trusted in the CLI is also trusted in the VS Code extension, and the other way round.
  • When a project's allow rules are skipped because the folder isn't trusted, the VS Code extension should let the user trust the folder or at least say that the rules are being ignored, instead of ignoring them silently.

Error Messages/Logs

# The VS Code extension prints nothing; it only prompts.
# `claude -p` shows the key it looks up. From PowerShell (Set-Location c:\Users\me\repo):
Ignoring 21 permissions.allow entries from .claude/settings.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["C:/Users/me/repo"].hasTrustDialogAccepted: true in C:\Users\me\.claude.json.

# From cmd after `cd /d c:\Users\me\repo`:
Ignoring 21 permissions.allow entries from .claude/settings.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["c:/Users/me/repo"].hasTrustDialogAccepted: true in C:\Users\me\.claude.json.

Steps to Reproduce

  1. On Windows, create a git repository with this .claude/settings.json:

``json
{
"permissions": {
"allow": ["PowerShell(npx cowsay *)", "Bash(npx cowsay *)"]
}
}
``

  1. Open the folder in VS Code, start a session in the Claude Code extension, and ask it to run npx cowsay hello. A permission prompt appears.
  2. In a PowerShell terminal in that folder, run claude, accept the trust dialog, and /exit. ~/.claude.json now has "C:/Users/me/repo": { "hasTrustDialogAccepted": true, ... }.
  3. Start a new session in the VS Code extension and repeat step 2. It still prompts. MCP tools in the allow list prompt too.
  4. In ~/.claude.json, add "c:/Users/me/repo": { "hasTrustDialogAccepted": true } (lowercase drive letter).
  5. Start a new session in the VS Code extension and repeat step 2. There is no prompt; the allow rules now apply.

Claude Model

Not sure / Multiple models (not model-related)

Is this a regression?

I don't know

Claude Code Version

2.1.289 (VS Code extension, entrypoint claude-vscode); CLI 2.1.280 (Claude Code)

Platform

Anthropic API

Operating System

Windows (Windows 11 Pro 10.0.26200)

Terminal/Shell

VS Code integrated terminal (PowerShell 7; cmd used for comparison)

Additional Information

  • This affects anyone who ships a template repository with .claude/settings.json allow rules and uses it from the VS Code extension on Windows: the rules never take effect.
  • Workarounds we found: (a) choose "Yes, allow … for this session" at the first prompt; (b) start claude once from cmd after cd /d c:\... (lowercase drive letter) and accept the trust dialog, so the trust is saved under the key the extension uses.

View original on GitHub ↗