Symlink and mount checks while walking into directories are hardened against races and permission errors
When Claude Code verifies that a file path's parent directories are what they're expected to be (checking they haven't been swapped out for a symlink, for example), it now walks the path one directory level at a time, re-verifying each level even if the normal file-status check fails with a permission error. As a fallback, it opens the directory directly with a flag that refuses to follow symlinks, in order to check it safely.
This closes a race-condition window (called TOCTOU, time-of-check to time-of-use) where a symlink could be swapped in partway through a path check, and it makes the check more robust on systems where permission errors would otherwise have blocked verification entirely.