claude-code - 💡(How to fix) Fix [Bug] Claude Code exits with code 1 when inline --settings temp file in /tmp is owned by another user [3 pull requests]

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…

Error Message

If temp settings file creation fails, Claude Desktop should show the original error message, such as EACCES: permission denied, instead of only showing Claude Code process exited with code 1.

Error Messages/Logs

Underlying Claude Code error reproduced from terminal: Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json' Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

Fix Action

Fixed

Code Example

Claude Desktop UI:

Claude Code crashed
Claude Code process exited with code 1

Underlying Claude Code error reproduced from terminal:

Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

The stale temp file was owned by another local user:

-rw-r--r--  1 <other-user>  wheel  2 <date> /tmp/claude-settings-44136fa355b3678a.json

Claude Desktop launched Claude Code with inline settings:

--settings {}
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?

Claude Desktop Code mode crashes immediately after sending any message.

The UI only shows:

Claude Code crashed Claude Code process exited with code 1

What Should Happen?

Claude Code should start normally and process the message instead of exiting during startup.

When inline settings are passed with --settings '{}', Claude Code should create a temp settings file in a way that cannot collide with a stale file owned by another local user. For example, it should use a unique per-process temp file or a user-owned temp directory.

If temp settings file creation fails, Claude Desktop should show the original error message, such as EACCES: permission denied, instead of only showing Claude Code process exited with code 1.

Error Messages/Logs

Claude Desktop UI:

Claude Code crashed
Claude Code process exited with code 1

Underlying Claude Code error reproduced from terminal:

Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

The stale temp file was owned by another local user:

-rw-r--r--  1 <other-user>  wheel  2 <date> /tmp/claude-settings-44136fa355b3678a.json

Claude Desktop launched Claude Code with inline settings:

--settings {}

Steps to Reproduce

  1. Have a stale temp settings file at /tmp/claude-settings-44136fa355b3678a.json.

  2. Make sure that file is owned by another local user, so the current user cannot overwrite it.

  3. Start Claude Desktop and open Code mode.

  4. Send any message.

  5. Claude Code exits during startup and Claude Desktop shows: Claude Code process exited with code 1.

This can also be reproduced directly from the terminal with:

"/Users/<user>/Library/Application Support/Claude/claude-code/2.1.128/claude.app/Contents/MacOS/claude" --settings '{}' --version

Failing output:

Error processing settings: EACCES: permission denied, open '/tmp/claude-settings-44136fa355b3678a.json'

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown

Claude Code Version

2.1.133 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This was observed in Claude Desktop Code mode.

Claude Desktop version: 1.6608.0 Bundled Claude Code version used by Desktop: 2.1.128 Standalone Claude Code CLI version: 2.1.133

The issue was fixed locally by deleting the stale temp file:

sudo rm -f /tmp/claude-settings-44136fa355b3678a.json

After deletion, this command succeeded:

"/Users/<user>/Library/Application Support/Claude/claude-code/2.1.128/claude.app/Contents/MacOS/claude" --settings '{}' --version

Output:

2.1.128 (Claude Code)

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