claude-code - 💡(How to fix) Fix [BUG] /tmp/claude-settings-{hash}.json permission conflict when multiple macOS users run SSH sessions simultaneously [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57798Fetched 2026-05-11 03:25:07
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2closed ×1

Error Message

Error Messages/Logs

[warn] [RemoteProcess] stderr: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

Root Cause

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.

Fix Action

Fix / Workaround

Workaround

Code Example

/tmp/claude-settings-{uid}-{hash}.json

---

~/.claude/claude-settings-{hash}.json

---

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

---

# ~/.zshenv (remote host, per user)
touch /tmp/claude-settings-44136fa355b3678a.json
chmod 666 /tmp/claude-settings-44136fa355b3678a.json

---

/tmp/claude-settings-{uid}-{hash}.json

---

~/.claude/claude-settings-{hash}.json
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Two macOS users (userA, userB) exist on a remote Mac
  2. Both have Claude Code properly configured (~/.claude.json, CLAUDE_CODE_OAUTH_TOKEN set)
  3. Open Claude Desktop App → Code tab → SSH session as userA → start session ✅
  4. Open a second SSH session as userB on the same remote host → send first message
  5. 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: /tmp is cleared on reboot. For a persistent fix, add this to a LaunchDaemon or 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}.json

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING