Multi-user permission conflict with shared /tmp/claude/ directory
Description
When multiple users on the same machine use Claude Code, permission errors occur because the /tmp/claude/ directory is shared across all users.
Steps to Reproduce
- User A runs Claude Code - this creates
/tmp/claude/owned by User A - Switch to User B on the same machine
- User B runs Claude Code and attempts any Bash command
- Error occurs:
EACCES: permission denied, mkdir '/tmp/claude/-Users-...'
Error Message
Error: EACCES: permission denied, mkdir '/tmp/claude/-Users-userB-path-to-project/tasks'
Expected Behavior
Each user should have isolated temp directories that don't conflict with other users on the system.
Suggested Fix
Use per-user temp directories instead of a shared path:
-
$TMPDIR/claude/(macOS sets this per-user) -
/tmp/claude-$USER/ -
/tmp/claude/$UID/
Environment
- OS: macOS (Darwin 24.6.0)
- Multiple local user accounts on shared machine
Workaround
Run sudo rm -rf /tmp/claude when switching users.
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/12938
- https://github.com/anthropics/claude-code/issues/15700
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.