Claude Desktop Code mode crashes immediately (exit code 1) — works fine from CLI
Status Closed — not planned
Reported on v2.1.85
Maintainer reply None cached
Activity 16 comments · opened Mar 29, 2026 · closed Jun 8, 2026
Summary
Claude Desktop's Code mode (agent mode) crashes immediately with Claude Code process exited with code 1 when starting a session. Chat mode works fine. The same Claude Code binary works perfectly when invoked from the CLI in the same directory.
Environment
- macOS: Darwin 25.3.0 (Apple Silicon)
- Claude Desktop: v1.1.9310
- Embedded Claude Code: v2.1.85
- CLI Claude Code: v2.1.86
Reproduction
- Open Claude Desktop in Code mode (
sidebarMode: "code") - Navigate to a project folder (path contains Japanese characters and spaces)
- Send any message
- Session crashes instantly — no response
This occurs consistently across multiple restarts, sign-out/sign-in cycles, and full cache wipes.
Logs
From ~/Library/Logs/Claude/main.log (paths redacted):
[info] Starting local session local_XXXX in <project_dir>
[info] [CCD] Passing 9 plugin(s) to SDK (skills: 1, remote: 0, local: 8)
[info] Using Claude Code binary at: ~/Library/Application Support/Claude/claude-code/2.1.85/claude.app/Contents/MacOS/claude
[error] Session local_XXXX query error: Claude Code process exited with code 1
[info] [CCD CycleHealth] unhealthy cycle for local_XXXX (2s, hadFirstResponse=false, reason=no_response)
What I've tried (all failed)
- Sign out / sign in
- Full cache wipe (
Session Storage/,Cache/,IndexedDB/,local-agent-mode-sessions/,bridge-state.json) - Multiple app restarts
- New conversations
- Check for app updates (latest)
- Verified the binary runs fine from CLI:
claude -p "test"→ works - Verified with Desktop-like flags (
--output-format stream-json --input-format stream-json --verbose --permission-mode bypassPermissions) → works - Verified with Desktop-like env vars (
CLAUDE_CODE_ENTRYPOINT=claude-desktop,CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1, etc.) → works
Key finding
- Chat mode: works normally
- Code mode: instant crash (exit code 1), no stderr visible
- CLI in same directory: works perfectly
- The Desktop does not expose stderr from the spawned Claude Code process, making it impossible to diagnose further from the user side
- The issue may be related to Japanese characters in the working directory path — the Desktop's shell wrapper (
eval+ zsh) may not handle certain CJK path names correctly
Additional issue found during investigation
bridge-state.json persisted a corrupted remote session causing infinite Epoch mismatch (409) loops. Manually resetting this file to {} resolved the chat mode issue, but Code mode remained broken.
Showing cached comments. Read the full discussion on GitHub ↗
15 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
+1 — Same issue here. Max subscriber, broken for over a week (since March 22).
Root cause confirmed: Desktop App passes flags (
--plugins,--sdk-metadata) that the embedded Claude Code binary (2.1.78 / 2.1.87) doesn't recognize → immediate exit code 1. CLI works fine.Full technical analysis in #40540.
+1 — still happening on Claude for Mac 1.3109.0 (35cbf6) with Opus 4.7 1M model. Error "Claude Code process exited with code 1" appears when trying to start any Code-mode conversation, including trivial messages (just typing "claude" and sending). #40540 was closed as resolved but the problem persists on this version. Timestamp: 2026-04-19.
Desktop app version (you’re on 2.1.116)
macOS version (Apple menu → About This Mac)
Exact error: “Claude Code process exited with code 1”
Steps: open Claude Desktop → Claude Code → new session → point to local folder → send “Hi, Let’s start” → it breaks
Additional reproduction data — macOS Tahoe, SDK 2.1.111, persistent since March 26
Environment
Symptoms
Log evidence (39 occurrences, dating back to March 26)
Crash pattern (
~/Library/Logs/Claude/main.log):Stack trace:
Key observations
claude-code/2.1.111/claude.app/Contents/MacOS/claude --version→2.1.111 (Claude Code)✅hadFirstResponse=false)Confirms the SDK flag incompatibility root cause identified in #40540.
Also hitting this on the latest Desktop build.
Environment
claude install)What works: Chat mode, Cowork mode, Claude Code from Terminal — all fine.
What doesn't: Code mode in the Desktop app crashes instantly on every message with "Claude Code process exited with code 1." Happens on both existing and new sessions.
Timing: This was working until the 1.3561.0 build landed on April 20.
Key log lines (main.log):
Binary is hit at:
/Users/[user]/Library/Application Support/Claude/claude-code/2.1.111/claude.app/Contents/MacOS/claudeThe bundled binary works fine when invoked directly from Terminal. The crash occurs the instant the Desktop app spawns it — before any hooks or tools execute.
Troubleshooting attempted (none resolved):
claude install(native)claude auth logout/claude auth login~/Library/Application Support/Claude/claude-code/claude_desktop_config.jsonConfig file (
claude_desktop_config.json) has no MCP servers — the 7 servers in the log are all internal/injected by the app.I'm having this issue on my MacBook Pro intel :(
I have had this same issue for weeks now. This seems like a basic bug that would affect all Mac users, why is it not getting fixed?
Anthropic — this needs a patch immediately. Not next sprint. Now.
The root cause has been confirmed for over a month in #40540: the Desktop App passes
--pluginsand--sdk-metadataflags that the embedded Claude Code binary does not recognize, causing immediate exit code 1 on every spawn. The reporter literally wrote: "Nothing fixes it because the issue is in how the Desktop App invokes the embedded binary."Despite that confirmation, the same bug keeps resurfacing across versions and platforms — #42350, #43164, #44573, #46161, #49041, #49271, #50073, and now #52766. Closing #40540 did not fix it; it just buried the canonical explanation while paying customers keep hitting the same wall.
My situation as a paying Claude Pro user:
This is not a minor regression. The Desktop App's primary value proposition — the GUI for Claude Code — has been non-functional on Windows and macOS for multiple weeks, with a known and trivially describable root cause sitting in a closed issue.
What I expect, in priority order:
This is still an issue on the Claude Desktop app for Mac (Claude 1.6259.1 (5095e7) 2026-05-06T03:26:09.000Z)
meet this on claude desktop app for mac (Claude 1.6608.0 (f65729) 2026-05-07T14:16:09.000Z)
After an update I was given a more informative error code. Following that I went to System Settings > Privacy and Security > Full disk Access: Switched on the Claude App switch and I was back in business. Hope that works for others
Still doesn't work for me anymore even though I have given Claude full disk access etc., but I am thinking it is something to do with my target folder being within Dropbox rather than elsewhere on my hard drive (the Code stuff is part of a much larger project and easier to keep all together via Dropbox). Not sure why it worked with no issue until recently but something definitely changed. Code via terminal works just fine, though, so no idea why it does this.
Still doesn't work for me as well for 3 days.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.