Relative path permission patterns don't match absolute tool paths

Resolved 💬 3 comments Opened Jan 14, 2026 by markus-psx Closed Feb 28, 2026

Description

Relative path patterns in permissions.allow (e.g., Write(.claude/**)) don't prevent permission prompts when the Write tool uses absolute paths internally.

Steps to Reproduce

  1. Create .claude/settings.json in a project with:
{
  "permissions": {
    "allow": [
      "Write(.claude/**)",
      "Write(./**)"
    ]
  }
}
  1. Restart Claude Code session (to load fresh permissions)
  1. Ask Claude to write a file to the .claude/ directory
  1. Claude uses the Write tool with an absolute path like:

/Users/username/path/to/project/.claude/temp-file.txt

  1. Result: Permission prompt appears despite the Write(.claude/**) rule

Expected Behavior

According to the documentation, patterns like .claude/** or ./path should resolve relative to the current working directory. The pattern Write(.claude/**) should match writes to any file in the .claude/ subdirectory without prompting.

Actual Behavior

The permission prompt still appears, suggesting the relative pattern isn't being matched against the absolute path the Write tool uses.

Environment

  • Claude Code CLI
  • macOS (Darwin 25.2.0)
  • Project-level settings in .claude/settings.json

Workaround Attempted

Using absolute paths in user-level ~/.claude/settings.json works, but this isn't portable for team projects where different developers have different checkout paths.

Additional Context

The same settings file has Read(./**) and Edit(./**) patterns - it would be helpful to know if these have the same issue or if it's specific to the Write tool.

View original on GitHub ↗

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