[BUG] Recursive permission patterns (**) not matching nested files on Windows

Resolved 💬 3 comments Opened Jan 9, 2026 by MasterGabe007 Closed Feb 25, 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?

Bug Report: Recursive Permission Patterns (**) Not Matching Nested Files

Description

After configuring settings.json with recursive glob patterns using ** to allow read access to all files in a directory tree, Claude Code still prompts for permission when attempting to read nested files.

Expected Behavior

When Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**) is specified in the permissions.allow array, all files within that directory and its subdirectories should be readable without permission prompts.

Actual Behavior

Despite the recursive pattern configuration and restarting Claude Code, attempting to read nested files (e.g., D:\_ABRepos\AB_BitBucket_MainCurr\_AbatLatest\DotNet\DataAggregationTool\Configuration.cs) still triggers a permission prompt.

Steps to Reproduce

  1. Edit C:\Users\<username>\.claude\settings.json with the following permissions:
{
  "permissions": {
    "allow": [
      "Glob",
      "Grep",
      "Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
      "Bash(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Bash(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
      "Glob(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Glob(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
      "Grep(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Grep(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)"
    ]
  }
}
  1. Restart Claude Code terminal session
  2. Attempt to read a nested file: Read(D:\_ABRepos\AB_BitBucket_MainCurr\_AbatLatest\DotNet\DataAggregationTool\Configuration.cs)
  3. Permission prompt appears despite configuration

Environment

  • OS: Windows
  • Claude Code Version: 2.1.2
  • Settings Location: C:\Users\GabeAdmin\.claude\settings.json

Additional Context

  • The base directory pattern alone (Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest)) may or may not work - untested
  • Glob syntax ** is documented as matching zero or more path segments recursively
  • This appears to be a pattern matching issue in the permission system specifically

Workaround Attempted

Tried both ** and **\* patterns with no success.

Suggested Fix

Permission matcher should properly handle ** glob syntax to recursively match all nested paths, consistent with standard glob implementations.

What Should Happen?

Expected Behavior

When Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**) is specified in the permissions.allow array, all files within that directory and its subdirectories should be readable without permission prompts.

Error Messages/Logs

Permission prompt appears despite configuration

Steps to Reproduce

Steps to Reproduce

  1. Edit C:\Users\<username>\.claude\settings.json with the following permissions:
{
  "permissions": {
    "allow": [
      "Glob",
      "Grep",
      "Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
      "Bash(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Bash(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
      "Glob(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Glob(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
      "Grep(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
      "Grep(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)"
    ]
  }
}
  1. Restart Claude Code terminal session
  2. Attempt to read a nested file: Read(D:\_ABRepos\AB_BitBucket_MainCurr\_AbatLatest\DotNet\DataAggregationTool\Configuration.cs)
  3. Permission prompt appears despite configuration

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.2

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

full list of permission block:

{
	"permissions": {
		"allow": [
			"Glob",
			"Grep",
			"Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
			"Read(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
			"Bash(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
			"Bash(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
			"Glob(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
			"Glob(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
			"Grep(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
			"Grep(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**\\*)",
			"Read(C:\\Users\\GabeAdmin\\.claude\\**)"
		],
		"ask": [
			"Bash(git *)",
			"Edit(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)",
			"Write(D:\\_ABRepos\\AB_BitBucket_MainCurr\\_AbatLatest\\**)"
		],
		"deny": [
			"Bash(rm *)",
			"Bash(rmdir *)",
			"Bash(del *)",
			"Bash(erase *)",
			"Bash(label *)",
			"Bash(RM *)",
			"Bash(RMDIR *)",
			"Bash(DEL *)",
			"Bash(ERASE *)",
			"Bash(LABEL *)"
		]
	}
}

View original on GitHub ↗

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