Unnecessary permission prompts for symlinked files in allowed directory
Bug description
When the current working directory contains symlinks pointing to files in another directory, Claude Code repeatedly asks for read permission on those files — even though:
- The files (symlinks) are located within the current project directory
- Read permission for the project directory is already granted (e.g., via
CLAUDE.mdrules or user approval)
Claude Code seems to resolve the symlink target path and then evaluate permissions against the target directory rather than the link location. Since the target directory is different from the project directory, it triggers a permission prompt.
Expected behavior
If a symlink resides inside an allowed directory, reading it should not require additional permission — regardless of where the symlink target points. The permission check should be based on the symlink's location, not the resolved target path.
Steps to reproduce
- Create a project directory with a
CLAUDE.mdthat grants read access to all files in the project folder - Add a symlink inside the project directory that points to a file in a different directory (e.g.,
ln -s /other/path/file.txt ./file.txt) - Ask Claude Code to read
./file.txt - Claude Code will prompt for permission, even though the file is inside the allowed project directory
Environment
- OS: Windows 10 Pro (also likely reproducible on Linux/macOS)
- Claude Code: latest version
- Symlinks created via
mklink(Windows) orln -s(Unix)
Additional context
This is particularly annoying for projects that use symlinks extensively (e.g., shared preamble files, dotfiles, monorepo setups). The user has to repeatedly approve reads for files that should already be permitted.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗