claude-code - 💡(How to fix) Fix [BUG] Claude Code process exited with code 1 - Desktop app only, terminal works fine [1 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#49160Fetched 2026-04-17 08:49:11
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
1
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Error Message

Every time I enter a command in the Claude Code feature inside the desktop app, I get this error and nothing executes:

Error Messages/Logs

Code Example

Claude Code process exited with code 1
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?

Body: Environment

Device: MacBook Air (Apple Silicon / arm64) OS: macOS (zsh) Claude desktop app: freshly installed Claude Code version: 2.1.110 Account: Claude Pro

Problem Every time I enter a command in the Claude Code feature inside the desktop app, I get this error and nothing executes:

Claude Code process exited with code 1

The same commands work fine when running claude from the terminal. What I have tried

Uninstalled and reinstalled the desktop app → no improvement Logged out and back in → no improvement Ran claude install → version 2.1.110 confirmed working in terminal Deleted old binary at /usr/local/bin/claude with sudo rm Moved app to Applications folder (was launching from read-only volume) Ran claude doctor → two installations found, removed npm-global version with sudo npm -g uninstall @anthropic-ai/claude-code Added Claude to Full Disk Access in System Settings → no improvement Deleted ~/Library/Application Support/Claude and reinstalled → no improvement Checked env | grep ANTHROPIC → no API key set Checked Console.app for Claude-related errors → no messages found

Current state

Terminal: claude works correctly Desktop app: every command results in code 1, nothing executes This happens in all project folders

What Should Happen?

Commands entered in the Claude desktop app's Claude Code feature should execute normally, just like they do in the terminal.

Error Messages/Logs

Claude Code process exited with code 1

Steps to Reproduce

  1. Open Claude desktop app
  2. Select any project folder
  3. Enter any command in the Claude Code input field
  4. Claude Code process exits with code 1 immediately

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.110 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue might be related to the environment or configuration of the Claude Code feature within the desktop app, and verifying the execution path and environment variables could help identify the root cause.

Guidance

  • Check the execution path of the Claude Code process within the desktop app to ensure it matches the terminal environment where the commands work correctly.
  • Verify that the environment variables, especially those related to the Anthropic API, are correctly set within the desktop app's context.
  • Compare the system settings and permissions for the terminal and desktop app to identify any discrepancies that could affect the execution of Claude Code commands.
  • Consider testing the Claude Code feature with a different project folder or a simplified command to isolate if the issue is specific to certain projects or commands.

Example

No specific code snippet can be provided without more details on the internal workings of the Claude Code feature and the Anthropic API. However, ensuring that the PATH environment variable and any other relevant variables are correctly set within the desktop app's environment could be crucial.

Notes

The issue seems to be specific to the desktop app environment, as the same commands work correctly when executed from the terminal. This suggests that the problem might be related to how the desktop app configures or interacts with the Claude Code feature.

Recommendation

Apply workaround: Given the complexity of the issue and the lack of a clear root cause, applying a workaround such as executing commands through the terminal or exploring alternative methods to interact with the Claude Code feature within the desktop app might be necessary until a more definitive solution can be found.

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