claude-code - 💡(How to fix) Fix [BUG] ccd-cli fails on multi-user Linux: /tmp/claude-settings-{hash}.json collides between users [2 comments, 3 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#53361Fetched 2026-04-26 05:17:46
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2cross-referenced ×1

Error Message

  1. Claude Code Desktop shows: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'. Session never starts.
  • The user-facing error in the actual Cowork init is "Settings file not found: {}" (the CLI is invoked with --settings {} as inline JSON, but on this code path the error message treats {} as a missing file path) — doubly misleading and made debugging take hours. Separately: improve the "Settings file not found: {}" error to distinguish between inline JSON and file-path values for --settings / --managed-settings.

Fix Action

Fix / Workaround

Workaround: wrap ccd-cli to set TMPDIR=$HOME/tmp so each user gets a private settings dir

RAW_BUFFERClick to expand / collapse

Environment: Claude Code Desktop (macOS) → Cowork remote on Ubuntu, ccd-cli 2.1.119, multi-user Linux box, /tmp mode 1777

Repro:

  1. User A runs a Cowork session against a shared Linux host with empty/default settings → ccd-cli writes /tmp/claude-settings-44136fa355b3678a.json (mode 644, owned by A). (44136fa355b3678a is the hash for {}.)
  2. User B starts a Cowork session against the same host with the same settings.
  3. ccd-cli on User B's side tries to open the same path for write → EACCES: permission denied. Process exits 1.
  4. Claude Code Desktop shows: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'. Session never starts.

Why it's bad:

  • Hash is content-addressed, no uid in the path → any two users on the same host with identical settings collide.
  • /tmp sticky bit means the second user can't delete the first user's file. Needs sudo or the original owner to clean up.
  • The user-facing error in the actual Cowork init is "Settings file not found: {}" (the CLI is invoked with --settings {} as inline JSON, but on this code path the error message treats {} as a missing file path) — doubly misleading and made debugging take hours.

Suggested fixes:

  • Include $UID in the path: /tmp/claude-settings-${uid}-${hash}.json, or
  • Honor TMPDIR and default to ~/.cache/claude/ (XDG) instead of /tmp, or
  • Open with O_EXCL | O_CREAT and pick a fresh path on collision.

Separately: improve the "Settings file not found: {}" error to distinguish between inline JSON and file-path values for --settings / --managed-settings.

Workaround: wrap ccd-cli to set TMPDIR=$HOME/tmp so each user gets a private settings dir

extent analysis

TL;DR

Modify the ccd-cli to include the user's UID in the settings file path or use a user-specific temporary directory to avoid collisions.

Guidance

  • Consider modifying the settings file path to include the user's UID, e.g., /tmp/claude-settings-${uid}-${hash}.json, to prevent collisions between users with identical settings.
  • Alternatively, use the TMPDIR environment variable to store settings files in a user-specific directory, such as ~/.cache/claude/, to avoid conflicts.
  • To mitigate the issue temporarily, wrap the ccd-cli command to set TMPDIR=$HOME/tmp, providing each user with a private settings directory.
  • Improve the error message for "Settings file not found: {}" to distinguish between inline JSON and file-path values for --settings and --managed-settings to reduce debugging time.

Example

No code snippet is provided as it is not explicitly supported by the issue.

Notes

The suggested fixes and workarounds are based on the information provided in the issue and may not be exhaustive. The issue highlights the importance of considering user-specific settings and temporary directories to prevent collisions.

Recommendation

Apply the workaround by setting TMPDIR=$HOME/tmp to provide each user with a private settings directory, as this is a relatively simple and effective solution to mitigate the issue.

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 [BUG] ccd-cli fails on multi-user Linux: /tmp/claude-settings-{hash}.json collides between users [2 comments, 3 participants]