[BUG] Project-local symlink to allowed external directory is still unusable

Resolved 💬 1 comment Opened Apr 22, 2026 by jkristoph Closed May 28, 2026

Bug Description

Claude Code cannot reliably use a project subdirectory that is a symlink to a directory outside the project root, even when the target path is explicitly allowed via permissions.additionalDirectories or --add-dir.

Example layout:

/Users/<me>/Documents/Projects/example/.gsd -> /Users/<me>/.gsd/projects/test123

The symlink is valid and works in the shell, but Claude Code still fails to use the symlinked path for normal agent work.

This appears to be the intersection of:

  • #764 (symlink traversal failure)
  • #29013 (additionalDirectories does not grant actual access)

Steps to Reproduce

  1. Create a project and an external directory:

``bash
mkdir -p /Users/<me>/Documents/Projects/example
mkdir -p /Users/<me>/.gsd/projects/test123
echo "hello" > /Users/<me>/.gsd/projects/test123/test.txt
``

  1. Symlink a project-local subdirectory to the external directory:

``bash
ln -s /Users/<me>/.gsd/projects/test123 /Users/<me>/Documents/Projects/example/.gsd
cd /Users/<me>/Documents/Projects/example
``

  1. Confirm the symlink works normally:

``bash
ls -la .gsd
``

  1. Allow the external target path using either:
  • permissions.additionalDirectories, or
  • claude --add-dir /Users/<me>/.gsd/projects/test123
  1. Ask Claude Code to read or operate on .gsd/test.txt (or otherwise use .gsd/ normally).

Expected Behavior

If the real target path is explicitly allowed, Claude Code should be able to traverse the project-local symlink and use files under .gsd/ normally.

Actual Behavior

The symlinked path remains unusable for agent work even though:

  • the symlink is valid
  • the target exists
  • the target works in the shell
  • the target path is explicitly allowed

Environment

  • macOS
  • Claude Code current as of 2026-04-22

Notes

This seems distinct from the existing issues because it is specifically:

  • a symlink inside the project
  • pointing to a directory outside cwd
  • where explicitly allowing the real target still does not make the project-local symlink usable

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗