[BUG] Claude Desktop Linux arm64: Code tab fails with "No path to Claude code executable" — downloader opens the version directory itself (EINVAL)
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?
On Claude Desktop for Linux arm64 (official apt package), the Code tab fails with:
"Claude Code could not start — The Claude Code binary is missing or damaged. Reinstall Claude Desktop to continue."
"No path to Claude code executable (Download failed. Check your internet connection and try again.)" [ccdErrorCategory:sdk_binary_missing]
The network is NOT the problem: downloads.claude.ai is reachable with curl from the same machine, and fetching the release file manually works.
Root cause (from main.log): the downloader creates the version directory ~/.config/Claude/claude-code/2.1.246/, then tries to open THE DIRECTORY ITSELF as the destination file — the binary filename component resolves to an empty string on the linux-arm64 host target, causing EINVAL. After 3 attempts, the version directory exists but is empty. Deleting ~/.config/Claude/claude-code doesn't help: the app recreates it and fails identically, so it's not stale local state. The embedded manifest does contain a linux-arm64 entry ("binary":"claude.zst") and the download URL pattern is valid.
What Should Happen?
downloadBinaryForTarget should resolve the destination filename (claude) for the linux-arm64 host target and write to <storageDir>/<version>/claude, instead of opening <storageDir>/<version> (the directory) with an empty filename. The Code tab should then start local sessions normally.
Error Messages/Logs
[CCD] Binary preflight: no binary on disk — attempting repair download
[CCD] Download attempt 1/3 failed Error: EINVAL: invalid argument, open '$HOME/.config/Claude/claude-code/2.1.246'
at async N9t.downloadBinaryForTarget (/usr/lib/claude-desktop/resources/app.asar/.vite/build/index.chunk-CXspONox.js:13:1860564)
[CCD] Download attempt 2/3 failed Error: EINVAL: invalid argument, open '$HOME/.config/Claude/claude-code/2.1.246'
[CCD] Download attempt 3/3 failed Error: EINVAL: invalid argument, open '$HOME/.config/Claude/claude-code/2.1.246'
[CCD] All download attempts failed
error: Error: No path to Claude code executable (Download failed. Check your internet connection and try again.)
[startVM] VM not supported (linux/arm64), skipping
Steps to Reproduce
- Install Claude Desktop on a Linux arm64 (aarch64) machine from the official apt repository (claude-desktop 1.37937.3, Debian-based distro).
- Sign in with a Max plan account and open the Code tab.
- The app attempts to download Claude Code 2.1.246 and fails 3 times with EINVAL (see logs); the error banner appears.
~/.config/Claude/claude-code/2.1.246/is created but empty. - Workaround that confirms the diagnosis — manually placing the binary where the preflight looks makes everything work:
curl -fL "https://downloads.claude.ai/claude-code-releases/2.1.246/linux-arm64/claude.zst" -o /tmp/claude.zst
zstd -d -f /tmp/claude.zst -o ~/.config/Claude/claude-code/2.1.246/claude
chmod +x ~/.config/Claude/claude-code/2.1.246/claude
On next launch, preflight logs ".verified marker missing but binary exists — proceeding with spawn" and the Code tab works. The workaround must be repeated whenever the app pins a new version. Setting CLAUDE_CODE_LOCAL_BINARY had no effect.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.246 (version pinned by Claude Desktop; CLI 2.1.250 installed separately works fine)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_