claude-code - 💡(How to fix) Fix EACCES on /tmp/claude-settings-<hash>.json when another user created it first [1 participants]

Official PRs (…)
ON THIS PAGE

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#48400Fetched 2026-04-16 07:01:14
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

On multi-user macOS systems, Claude Code fails to start with:

Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-<hash>.json'

when another user on the same machine previously ran claude in the same working directory. The filename hash appears to be deterministic (derived from cwd or similar), so it collides across users. Because /tmp has the sticky bit, only the original owner (or root) can remove the file, blocking every other user until it is manually deleted.

Error Message

Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-<hash>.json'

Root Cause

when another user on the same machine previously ran claude in the same working directory. The filename hash appears to be deterministic (derived from cwd or similar), so it collides across users. Because /tmp has the sticky bit, only the original owner (or root) can remove the file, blocking every other user until it is manually deleted.

Fix Action

Workaround

sudo rm /tmp/claude-settings-<hash>.json. Setting TMPDIR has no effect because the path is hardcoded to /tmp.

RAW_BUFFERClick to expand / collapse

Summary

On multi-user macOS systems, Claude Code fails to start with:

Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-<hash>.json'

when another user on the same machine previously ran claude in the same working directory. The filename hash appears to be deterministic (derived from cwd or similar), so it collides across users. Because /tmp has the sticky bit, only the original owner (or root) can remove the file, blocking every other user until it is manually deleted.

Repro

  1. User A runs claude in /path/to/project → creates /tmp/claude-settings-<hash>.json owned by A (mode 644).
  2. User B runs claude in the same directory → crashes with EACCES.

Environment

  • Platform: darwin (macOS)
  • OS: Darwin 24.2.0
  • Shell: zsh

Expected

Per-user settings path (e.g. under $TMPDIR, which on macOS is already per-user at /var/folders/.../T/), or include uid in the filename, so multiple users on the same host don't collide.

Workaround

sudo rm /tmp/claude-settings-<hash>.json. Setting TMPDIR has no effect because the path is hardcoded to /tmp.

extent analysis

TL;DR

The most likely fix is to modify Claude Code to use a per-user temporary directory, such as $TMPDIR, instead of the hardcoded /tmp path.

Guidance

  • Investigate using the $TMPDIR environment variable, which is already per-user on macOS, to store the claude-settings-<hash>.json file.
  • Consider including the user's UID in the filename to prevent collisions between users.
  • Verify that the issue is resolved by running claude as multiple users in the same working directory and checking for the presence of the settings file in the expected location.
  • To mitigate the issue in the short term, users can manually delete the conflicting file using sudo rm /tmp/claude-settings-<hash>.json, but this is not a scalable solution.

Example

No code snippet is provided as the issue does not contain sufficient information about the Claude Code implementation.

Notes

The hardcoded /tmp path is the primary cause of the issue, and modifying it to use a per-user directory will likely resolve the problem. However, the exact implementation details of Claude Code are not provided, so the solution may require additional modifications.

Recommendation

Apply a workaround by modifying the Claude Code to use a per-user temporary directory, such as $TMPDIR, to store the settings file. This will prevent collisions between users and resolve the permission denied error.

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

claude-code - 💡(How to fix) Fix EACCES on /tmp/claude-settings-<hash>.json when another user created it first [1 participants]