[BUG] Claude Code treats bind mounts and symlinks as separate projects in .claude.json
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When the same directory is accessible via multiple paths (bind mounts, symlinks, or multiple NFS mounts), each path is treated as a separate project with independent settings, trust dialogs, and onboarding states.
For example,
/home/user is the symlink of /nfs/home/user. However, I have two entries in config that are mismatched. And modification to one doesn't reflect to the other.
"/home/user": {
"allowedTools": [],
"hasTrustDialogAccepted": false,
"projectOnboardingSeenCount": 4,
"lastSessionId": "7739c417-838e-4726-866b-2ba46c56873a"
},
"/nfs/home/user": {
"allowedTools": [],
"hasTrustDialogAccepted": true,
"projectOnboardingSeenCount": 0,
"lastSessionId": "04d8aaae-76c6-499c-923f-53ab0b1b03e5"
},
Everytime i open Claude from /home/user, it keeps showing the Do you trust the files in this folder? /home/user
❯ 1. Yes, proceed
What Should Happen?
When I open Claude the next time from /home/user, it should not show TrustDialog accepted.
Error Messages/Logs
Steps to Reproduce
- Mount or symlink the same directory at two paths (e.g., /home/user and /nfs/home/user)
- Run claude from /home/user
- Run claude from /nfs/home/user
- Check ~/.claude.json - you'll see duplicate project entries with different settings
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.6
Platform
Google Vertex AI
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗