Relative path permission patterns don't match absolute tool paths
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
- Create
.claude/settings.jsonin a project with:
{
"permissions": {
"allow": [
"Write(.claude/**)",
"Write(./**)"
]
}
}
- Restart Claude Code session (to load fresh permissions)
- Ask Claude to write a file to the
.claude/directory
- Claude uses the Write tool with an absolute path like:
/Users/username/path/to/project/.claude/temp-file.txt
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗