claude-code - 💡(How to fix) Fix Claude Desktop: /tmp/claude-settings-<hash>.json not UID-namespaced — second macOS user hits EACCES, Claude Code panel "crashes"

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…

On macOS systems with multiple user accounts, Claude Desktop's embedded Claude Code binary crashes with exit code 1 for every user except the first one to launch Claude.app. The desktop UI surfaces this only as a generic "Claude Code crashed" / Claude Code process exited with code 1 message in ~/Library/Logs/Claude/main.log, with no actionable error.

Error Message

On macOS systems with multiple user accounts, Claude Desktop's embedded Claude Code binary crashes with exit code 1 for every user except the first one to launch Claude.app. The desktop UI surfaces this only as a generic "Claude Code crashed" / Claude Code process exited with code 1 message in ~/Library/Logs/Claude/main.log, with no actionable error. Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json' This is a fairly hostile debugging path — the surfaced error gives no hint of the underlying issue. Suggest also surfacing the SDK child process's stderr in main.log so future users at least see the EACCES line.

Root Cause

The binary at ~/Library/Application Support/Claude/claude-code/<ver>/claude.app/Contents/MacOS/claude writes a content-hashed settings file to /tmp/claude-settings-<hash>.json. Because /tmp is shared across all macOS users and the path is not namespaced by UID, the first user to launch the app owns the file (default 0644). The second user's spawned claude opens it for writing and fails with EACCES.

Captured by running the desktop's exact spawn invocation manually (intercepted with a ps-watcher):

$ /Users/<user2>/Library/Application\ Support/Claude/claude-code/2.1.142/claude.app/Contents/MacOS/claude \
    --output-format stream-json --verbose --input-format stream-json \
    --effort low --model 'claude-opus-4-7[1m]' \
    --permission-prompt-tool stdio \
    --allowedTools mcp__computer-use,mcp__ccd_session__spawn_task,mcp__ccd_session__mark_chapter,mcp__ccd_session_mgmt__list_sessions \
    --setting-sources=user,project,local --permission-mode auto \
    --allow-dangerously-skip-permissions --include-partial-messages \
    --plugin-dir <...> --replay-user-messages --settings '{}'
Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

44136fa355b3678a corresponds to empty settings {}. Confirmed file state:

$ ls -la /tmp/claude-settings-*.json
-rw-r--r--@ 1 user1  wheel  2 May 18 10:08 /tmp/claude-settings-44136fa355b3678a.json

This message never reaches the desktop UI — it's swallowed by the SDK process spawn wrapper. Users see only Claude Code process exited with code 1 in main.log with a generic stack trace from BPi.getProcessExitError.

Fix Action

Fix / Workaround

Workaround for affected users

Code Example

$ /Users/<user2>/Library/Application\ Support/Claude/claude-code/2.1.142/claude.app/Contents/MacOS/claude \
    --output-format stream-json --verbose --input-format stream-json \
    --effort low --model 'claude-opus-4-7[1m]' \
    --permission-prompt-tool stdio \
    --allowedTools mcp__computer-use,mcp__ccd_session__spawn_task,mcp__ccd_session__mark_chapter,mcp__ccd_session_mgmt__list_sessions \
    --setting-sources=user,project,local --permission-mode auto \
    --allow-dangerously-skip-permissions --include-partial-messages \
    --plugin-dir <...> --replay-user-messages --settings '{}'
Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

---

$ ls -la /tmp/claude-settings-*.json
-rw-r--r--@ 1 user1  wheel  2 May 18 10:08 /tmp/claude-settings-44136fa355b3678a.json

---

/tmp/claude-settings-<uid>-<hash>.json

---

~/Library/Caches/com.anthropic.claudefordesktop/claude-settings-<hash>.json
RAW_BUFFERClick to expand / collapse

Summary

On macOS systems with multiple user accounts, Claude Desktop's embedded Claude Code binary crashes with exit code 1 for every user except the first one to launch Claude.app. The desktop UI surfaces this only as a generic "Claude Code crashed" / Claude Code process exited with code 1 message in ~/Library/Logs/Claude/main.log, with no actionable error.

Root cause

The binary at ~/Library/Application Support/Claude/claude-code/<ver>/claude.app/Contents/MacOS/claude writes a content-hashed settings file to /tmp/claude-settings-<hash>.json. Because /tmp is shared across all macOS users and the path is not namespaced by UID, the first user to launch the app owns the file (default 0644). The second user's spawned claude opens it for writing and fails with EACCES.

Captured by running the desktop's exact spawn invocation manually (intercepted with a ps-watcher):

$ /Users/<user2>/Library/Application\ Support/Claude/claude-code/2.1.142/claude.app/Contents/MacOS/claude \
    --output-format stream-json --verbose --input-format stream-json \
    --effort low --model 'claude-opus-4-7[1m]' \
    --permission-prompt-tool stdio \
    --allowedTools mcp__computer-use,mcp__ccd_session__spawn_task,mcp__ccd_session__mark_chapter,mcp__ccd_session_mgmt__list_sessions \
    --setting-sources=user,project,local --permission-mode auto \
    --allow-dangerously-skip-permissions --include-partial-messages \
    --plugin-dir <...> --replay-user-messages --settings '{}'
Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

44136fa355b3678a corresponds to empty settings {}. Confirmed file state:

$ ls -la /tmp/claude-settings-*.json
-rw-r--r--@ 1 user1  wheel  2 May 18 10:08 /tmp/claude-settings-44136fa355b3678a.json

This message never reaches the desktop UI — it's swallowed by the SDK process spawn wrapper. Users see only Claude Code process exited with code 1 in main.log with a generic stack trace from BPi.getProcessExitError.

Steps to reproduce

  1. Mac with at least two macOS user accounts (e.g., userA, userB).
  2. Sign into userA, launch Claude.app, sign in, send any message via Claude Code panel — works.
  3. Fast-User-Switch (or fully log out and into) userB. Launch Claude.app, sign in, send any message via Claude Code panel.
  4. Expected: Claude Code responds. Actual: Crash; main.log shows Claude Code process exited with code 1. ~/Library/Application Support/Claude/Sentry/ reports the same.

Environment

  • macOS 26.5 (Build 25F71), arm64 (Apple Silicon)
  • Claude Desktop 1.7196.1
  • Embedded Claude Code binary: 2.1.142
  • Two user accounts (one admin, one standard) — reproducible regardless of admin status

Suggested fix

Namespace the path by $UID (or equivalent), e.g.:

/tmp/claude-settings-<uid>-<hash>.json

Or, better, move the file out of /tmp entirely and into the per-user directory the app already uses:

~/Library/Caches/com.anthropic.claudefordesktop/claude-settings-<hash>.json

That latter location is per-user by macOS convention, naturally avoids cross-account collisions, and won't be wiped on reboot.

Workaround for affected users

Until this is fixed, a system-wide LaunchDaemon that watches /tmp and re-stats matching files to root:wheel 666 works as a permanent fix for multi-user Macs. (Happy to share the plist + script if useful to others reading this.)

Related

This is a fairly hostile debugging path — the surfaced error gives no hint of the underlying issue. Suggest also surfacing the SDK child process's stderr in main.log so future users at least see the EACCES line.

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