Permission matching fails for relative paths against absolute path rules

Resolved 💬 3 comments Opened Dec 31, 2025 by ianpatrickhines Closed Dec 31, 2025

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

  1. Add permission rule to ~/.claude/settings.json:

``json
"Edit(/Users/username/projects/**)"
``

  1. Launch Claude Code from /Users/username/projects/
  1. Ask Claude to edit a file in a subdirectory
  1. 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.

View original on GitHub ↗

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