[BUG] Claude Code Desktop crashes with "process exited with code 1" - binary works fine in terminal
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
macOS darwin-arm64
Claude Desktop app (latest)
Claude Code binary 2.1.138
Binary works perfectly from terminal (--print responds correctly)
OAuth token cached and valid
Log error: Session query error: Claude Code process exited with code 1
Reinstalled app and cleared all data — same result
Related to issue #39270
What Should Happen?
Claude Desktop app should successfully spawn the Claude Code process and respond to messages without crashing.
Error Messages/Logs
Session query error: Claude Code process exited with code 1
Using Claude Code binary at: .../claude-code/2.1.138/claude.app/Contents/MacOS/claude
Key findings:
- Binary works perfectly when called directly from terminal (responds normally)
- OAuth token is valid and cached correctly
- Reinstalled app and cleared all data - same result
- Platform: darwin-arm64, Claude Code 2.1.138
- Related to issue #39270
Steps to Reproduce
- Open Claude Desktop app on macOS (darwin-arm64)
- Create a new chat or open any existing session
- Send any message (even "hi")
- Claude Code crashes immediately with "process exited with code 1"
Additional findings:
- Happens on every single message, in every session
- Binary works fine when called directly from terminal:
~/Library/Application Support/Claude/claude-code/2.1.138/claude.app/Contents/MacOS/claude --print "hi" --output-format text
→ responds normally
- OAuth token is valid and cached
- Tried: logout/login, reinstall, clearing all app data, removing DIPS database, removing credentials — nothing works
- Claude Code CLI (claude in terminal) works perfectly
- Only the Desktop app's local process integration is broken
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code 2.1.138
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗