Permission patterns don't match /tmp/ paths when resolved to relative
Resolved 💬 4 comments Opened Feb 26, 2026 by kkauf Closed Mar 27, 2026
Bug
Permission patterns using absolute paths (e.g., Write(/tmp/**)) don't match when Claude Code internally converts the path to a relative traversal (e.g., ../../../../../../tmp/file.txt) before checking permissions.
Repro
- Add
Write(/tmp/**),Write(/tmp/*),Write(/private/tmp/**),Write(/private/tmp/*)to~/.claude/settings.jsonallow list - Open a project with a deeply nested working directory (e.g.,
~/Library/Mobile Documents/com~apple~CloudDocs/Documents/Personal Support) - Have Claude call
Writewith an absolute path:Write("/tmp/test.txt", "hello") - The UI shows the path as
../../../../../../tmp/test.txt(relative to working directory) - User is prompted for permission despite the allow pattern
Expected
The permission system should resolve paths to absolute before matching against allow/deny patterns. Write(/tmp/**) should match regardless of whether the internal representation is /tmp/file.txt or ../../../../../../tmp/file.txt.
Patterns tried (none work)
/tmp/*and/tmp/**/private/tmp/*and/private/tmp/**(macOS symlink)**/tmp/*and**/tmp/**
Environment
- Claude Code v2.1.45
- macOS (Darwin 25.2.0)
- Working directory: iCloud path (
~/Library/Mobile Documents/com~apple~CloudDocs/...) defaultMode: "acceptEdits"
Notes
- This previously worked (likely regressed in a recent update)
- Absolute paths match fine when the working directory is shallow or the project is under
/tmpitself - The
Writetool spec saysfile_pathmust be absolute, but the permission system converts it to relative before matching
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗