Skip to content

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

Description

@queglay

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:permissionsbugSomething isn't workingplatform:vscodeIssue specifically occurs in VS Codeplatform:windowsIssue specifically occurs on WindowsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions