Read permission with absolute path doesn't match when tool displays tilde path
Description
Read permissions configured with absolute paths in ~/.claude/settings.local.json do not auto-allow reads when the tool resolves the path with ~ (tilde) instead of the expanded home directory.
Steps to Reproduce
- Configure global settings in
~/.claude/settings.local.json:
``json``
{
"permissions": {
"allow": [
"Read(/Users/username/projects/my-docs/**)"
]
}
}
- From a different project directory (e.g.,
/Users/username/projects/some-other-project), attempt to read a file under the allowed path:
````
Read(~/projects/my-docs/some-file.md)
- Claude Code prompts for permission despite the path being covered by the allow rule.
Expected Behavior
The permission Read(/Users/username/projects/my-docs/**) should match regardless of whether the path is presented as /Users/username/projects/my-docs/... or ~/projects/my-docs/..., since ~ expands to /Users/username.
Actual Behavior
The permission prompt is shown:
Read(~/projects/my-docs/some-file.md)
Do you want to proceed?
1. Yes
2. Yes, allow reading from ... during this session
3. No
Workaround
Adding duplicate permission entries with ~ prefix:
"Read(~/projects/my-docs/**)"
Environment
- macOS
- Claude Code CLI
- Global settings file:
~/.claude/settings.local.json
Notes
The permission matching should normalize paths (expand ~ to the home directory) before checking against configured allow rules. This affects all Read permission patterns that use absolute paths.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗