[BUG] UNC paths in working directories cause settings.json permissions to be ignored

Resolved 💬 7 comments Opened Mar 1, 2026 by queglay Closed May 29, 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?

Description:

Claude Code silently ignores permission rules in settings.json / settings.local.json when the resolved working directory is a UNC path (e.g., \\server\share\path).

Environment:

OS: Windows 10 (Cygwin/MSYS2 shell)
Claude Code: VSCode extension

Actual behavior:

Claude Code prompts for permission on every tool call as if no allow rules exist. The settings.json permissions are silently ignored — no warning or error is logged.

Root cause hypothesis:

Path matching for permission rules likely uses string comparison or glob matching that doesn't account for UNC paths (\\host\share\...). Windows working directories can resolve to UNC paths when the workspace is on a network share, even if the user accesses it via a mapped drive letter. The mismatch between the UNC-resolved path and the drive-letter-based paths in settings causes all permission lookups to fail.

Workaround:

Ensure all configured working directories resolve to mapped drive letters rather than UNC paths, or avoid adding UNC paths to the additionalWorkingDirectories configuration.

Additional context:

This is particularly impactful on Windows in enterprise/VFX environments where network shares are common. The failure is silent — there's no indication that permissions were skipped due to path resolution, making it difficult to diagnose.

What Should Happen?

Permission rules from settings.json are respected and matching tool calls proceed without prompting.
Claude should respect permissions for UNC paths like the ones below:

      "Write(**)",
      "Write(//*/**)",

Error Messages/Logs

No error log, just being prompted for permisison

Steps to Reproduce

Reproduction steps:

Configure settings.json (global or project-level) with permission allow rules
Open Claude Code in a workspace where the working directory resolves to a UNC path (e.g., \\server\share\... rather than a mapped drive letter like S:\...)
Use tools that should be permitted by the settings
use plan mode to execute anything with auto-accept and permissive settings.json files will be ignored.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.5

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗