claude-code - 💡(How to fix) Fix [BUG] Desktop app local mode exits with code 1 immediately [1 comments, 2 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#49041Fetched 2026-04-17 08:52:31
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×3cross-referenced ×2commented ×1

Local mode in the Claude desktop app (Mac) exits immediately with code 1 on every prompt, including simple "hello". Cloud mode works fine. The bundled Claude Code binary works correctly when invoked directly from the terminal.

Error Message

2026-04-16 08:38:31 [info] [CCD] LocalSessions.getDefaultPermissionMode: cwd=/Users/andrewmackenzie/Desktop/AfterKey 2026-04-16 08:38:31 [info] LocalSessions.checkGhAvailable: cwd=/Users/andrewmackenzie/Desktop/AfterKey 2026-04-16 08:38:31 [info] [CCD] LocalSessions.setFocusedSession: sessionId=null 2026-04-16 08:38:36 [info] LocalSessions.checkTrust: cwd=/Users/andrewmackenzie/Desktop/AfterKey 2026-04-16 08:38:36 [info] LocalSessions.start: 2026-04-16 08:38:36 [info] Starting local session local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 in /Users/andrewmackenzie/Desktop/AfterKey 2026-04-16 08:38:36 [info] [CCD] Using skills plugin at: /Users/andrewmackenzie/Library/Application Support/Claude/local-agent-mode-sessions/skills-plugin/5fefc149-fed9-4cb2-830d-3b0a89fd9f23/40e6aba5-f204-476d-bfb9-bff617fb7ee0 2026-04-16 08:38:36 [info] [CCD] Passing 1 plugin(s) to SDK (skills: 1, remote: 0, local: 0) 2026-04-16 08:38:36 [info] Using Claude Code binary at: /Users/andrewmackenzie/Library/Application Support/Claude/claude-code/2.1.92/claude.app/Contents/MacOS/claude 2026-04-16 08:38:36 [error] Session local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 query error: Claude Code process exited with code 1 2026-04-16 08:38:36 [info] [CCD CycleHealth] unhealthy cycle for local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 (0s, hadFirstResponse=false, reason=no_response)

Root Cause

Local mode in the Claude desktop app (Mac) exits immediately with code 1 on every prompt, including simple "hello". Cloud mode works fine. The bundled Claude Code binary works correctly when invoked directly from the terminal.

Code Example

2026-04-16 08:38:31 [info] [CCD] LocalSessions.getDefaultPermissionMode: cwd=/Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:31 [info] LocalSessions.checkGhAvailable: cwd=/Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:31 [info] [CCD] LocalSessions.setFocusedSession: sessionId=null
2026-04-16 08:38:36 [info] LocalSessions.checkTrust: cwd=/Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:36 [info] LocalSessions.start:
2026-04-16 08:38:36 [info] Starting local session local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 in /Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:36 [info] [CCD] Using skills plugin at: /Users/andrewmackenzie/Library/Application Support/Claude/local-agent-mode-sessions/skills-plugin/5fefc149-fed9-4cb2-830d-3b0a89fd9f23/40e6aba5-f204-476d-bfb9-bff617fb7ee0
2026-04-16 08:38:36 [info] [CCD] Passing 1 plugin(s) to SDK (skills: 1, remote: 0, local: 0)
2026-04-16 08:38:36 [info] Using Claude Code binary at: /Users/andrewmackenzie/Library/Application Support/Claude/claude-code/2.1.92/claude.app/Contents/MacOS/claude
2026-04-16 08:38:36 [error] Session local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 query error: Claude Code process exited with code 1
2026-04-16 08:38:36 [info] [CCD CycleHealth] unhealthy cycle for local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 (0s, hadFirstResponse=false, reason=no_response)
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?

Description

Local mode in the Claude desktop app (Mac) exits immediately with code 1 on every prompt, including simple "hello". Cloud mode works fine. The bundled Claude Code binary works correctly when invoked directly from the terminal.

Environment

  • Desktop app: v1.2773.0
  • Bundled Claude Code: v2.1.92
  • CLI Claude Code (/usr/local/bin/claude): v2.1.83
  • macOS, Apple Git 2.50.1, Node v24.12.0

Steps to Reproduce

  1. Open Claude desktop app on Mac
  2. Select a project directory
  3. Select Local mode
  4. Type "hello" and send
  5. Immediately get: Claude Code process exited with code 1

Relevant Logs (~/Library/Logs/Claude/main.log)

[CCD] Passing 1 plugin(s) to SDK (skills: 1, remote: 0, local: 0) Using Claude Code binary at: .../claude-code/2.1.92/claude.app/Contents/MacOS/claude Session local_67e9fcdb... query error: Claude Code process exited with code 1 [CCD CycleHealth] unhealthy cycle (0s, hadFirstResponse=false, reason=no_response)

What Works

  • claude "hello" from terminal (CLI v2.1.83) — works
  • Bundled binary directly from terminal — works
  • Cloud mode in the desktop app — works

Diagnosis

Crash occurs the instant the desktop app spawns the binary — before any hooks or tools execute. The binary is functional standalone. The issue appears to be in how the SDK layer invokes the binary (possibly plugin/flag arguments).

Consistently reproducible across multiple attempts and app restarts.

What Should Happen?

Claude app should operate correctly

Error Messages/Logs

2026-04-16 08:38:31 [info] [CCD] LocalSessions.getDefaultPermissionMode: cwd=/Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:31 [info] LocalSessions.checkGhAvailable: cwd=/Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:31 [info] [CCD] LocalSessions.setFocusedSession: sessionId=null
2026-04-16 08:38:36 [info] LocalSessions.checkTrust: cwd=/Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:36 [info] LocalSessions.start:
2026-04-16 08:38:36 [info] Starting local session local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 in /Users/andrewmackenzie/Desktop/AfterKey
2026-04-16 08:38:36 [info] [CCD] Using skills plugin at: /Users/andrewmackenzie/Library/Application Support/Claude/local-agent-mode-sessions/skills-plugin/5fefc149-fed9-4cb2-830d-3b0a89fd9f23/40e6aba5-f204-476d-bfb9-bff617fb7ee0
2026-04-16 08:38:36 [info] [CCD] Passing 1 plugin(s) to SDK (skills: 1, remote: 0, local: 0)
2026-04-16 08:38:36 [info] Using Claude Code binary at: /Users/andrewmackenzie/Library/Application Support/Claude/claude-code/2.1.92/claude.app/Contents/MacOS/claude
2026-04-16 08:38:36 [error] Session local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 query error: Claude Code process exited with code 1
2026-04-16 08:38:36 [info] [CCD CycleHealth] unhealthy cycle for local_67e9fcdb-c81b-46bb-8ff0-ad6ce91dc4e6 (0s, hadFirstResponse=false, reason=no_response)

Steps to Reproduce

Open new claude session using local

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude 1.2773.0 (884b37) 2026-04-15T14:32:09.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue is likely due to how the SDK layer invokes the Claude Code binary in Local mode, and a potential workaround is to investigate the differences in invocation between the desktop app and the terminal.

Guidance

  • Investigate the command-line arguments and environment variables used when invoking the Claude Code binary from the desktop app versus the terminal to identify any discrepancies.
  • Verify that the claude-code binary is being executed with the correct permissions and in the correct working directory when invoked from the desktop app.
  • Check the desktop app's configuration and logs for any plugin or flag arguments that might be causing the issue.
  • Compare the versions of the Claude Code binary used in the desktop app and the terminal to ensure they are consistent.

Example

No code snippet is provided as the issue seems to be related to the invocation of the binary rather than a code-specific problem.

Notes

The issue appears to be specific to the Local mode in the desktop app and does not occur when using the Cloud mode or invoking the binary directly from the terminal. The fact that it worked in a previous version suggests a regression.

Recommendation

Apply a workaround by investigating the invocation differences and adjusting the desktop app's configuration accordingly, as the root cause seems to be related to how the binary is invoked rather than a version 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