Permission matching fails for relative paths against absolute path rules
Description
When a permission rule uses an absolute path pattern like Edit(/Users/username/projects/**), it does not match when the Edit tool is invoked with a relative path like my-app/src/components/Button.tsx, even though the resolved absolute path would be /Users/username/projects/my-app/src/components/Button.tsx.
Steps to Reproduce
- Add permission rule to
~/.claude/settings.json:
``json``
"Edit(/Users/username/projects/**)"
- Launch Claude Code from
/Users/username/projects/
- Ask Claude to edit a file in a subdirectory
- Claude prompts for permission even though the absolute path matches the rule
Expected Behavior
The permission system should resolve relative paths to absolute paths before matching against permission rules. The rule Edit(/Users/username/projects/**) should match any file under that directory regardless of whether the tool call uses a relative or absolute path.
Actual Behavior
Permission prompt appears because the relative path my-app/src/components/Button.tsx doesn't match the absolute pattern /Users/username/projects/**.
Workaround
Adding Edit(**) as an additional rule works, but is less precise than the absolute path rule.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗