[BUG] /tmp/claude-settings-{hash}.json permission conflict when multiple macOS users run SSH sessions simultaneously
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?
Description
When two different macOS users on the same remote host each open an SSH session in Claude Code Desktop simultaneously, the second user's session crashes immediately with exit code 1.
Root cause: Claude Code Desktop spawns ccd-cli with --settings {} on the remote host. The resulting settings file is written to /tmp/claude-settings-44136fa355b3678a.json using a deterministic hash of the settings content ({}). Since both users receive identical empty settings, the hash — and therefore the filename — is identical. The file is created with user-only permissions (owned by the first user). When the second user's session tries to open the same path, it receives EACCES: permission denied.
What Should Happen?
Expected Behavior
Multiple users on the same remote host should be able to run concurrent SSH sessions without file permission conflicts.
Suggested Fix
Include the remote user's UID or username in the filename, e.g.:
/tmp/claude-settings-{uid}-{hash}.json
Or write the settings file to the user's home directory instead of /tmp/:
~/.claude/claude-settings-{hash}.json
Error Messages/Logs
From `~/Library/Logs/Claude/ssh.log` on the local Mac:
[warn] [RemoteProcess] stderr: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'
[info] [RemoteProcess] Exited, code=1, duration=196ms
Steps to Reproduce
Steps to Reproduce
- Two macOS users (
userA,userB) exist on a remote Mac - Both have Claude Code properly configured (
~/.claude.json,CLAUDE_CODE_OAUTH_TOKENset) - Open Claude Desktop App → Code tab → SSH session as
userA→ start session ✅ - Open a second SSH session as
userBon the same remote host → send first message - Session crashes:
Claude Code process exited with code 1
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Code CLI: v2.1.128, Claude Desktop for Mac Claude 1.6608.2 (ebf1a1) 2026-05-08T23:17:27.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Environment
- Claude Desktop App (macOS)
- Claude Code via SSH session (Code tab)
- Remote host: macOS (Mac Studio)
- Multiple local macOS users connecting via SSH to the same remote host
- Claude Code CLI: v2.1.128
Workaround
Pre-create the file with world-writable permissions in each user's ~/.zshenv on the remote host:
# ~/.zshenv (remote host, per user)
touch /tmp/claude-settings-44136fa355b3678a.json
chmod 666 /tmp/claude-settings-44136fa355b3678a.json
Note:/tmpis cleared on reboot. For a persistent fix, add this to aLaunchDaemonor equivalent.
Suggested Fix
Include the remote user's UID or username in the filename, e.g.:
/tmp/claude-settings-{uid}-{hash}.json
Or write the settings file to the user's home directory instead of /tmp/:
~/.claude/claude-settings-{hash}.jsonThis issue has 3 comments on GitHub. Read the full discussion on GitHub ↗