claude-code - 💡(How to fix) Fix Remote Control (Windows Desktop → Linux VPS): ccd-cli upload fails with fork/exec ENOENT because Windows binary is sent to Linux server [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#52849Fetched 2026-04-25 06:19:15
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

Error Messages/Logs

Root Cause

Root cause (reverse engineered)

Fix Action

Workaround

Manually copy the Linux binary from the npm package already installed on the VPS:

cp /usr/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe ~/.claude/remote/ccd-cli/2.1.116
cd ~/.claude/remote/ccd-cli && ln -sf 2.1.116 2.1.101

This must be re-applied after every Desktop auto-update that changes the expected version.

Code Example

Failed to spawn Claude Code process: fork/exec /home/melih/.claude/remote/ccd-cli/2.1.101: no such file or directory

---

cp /usr/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe ~/.claude/remote/ccd-cli/2.1.116
cd ~/.claude/remote/ccd-cli && ln -sf 2.1.116 2.1.101

---

Failed to spawn Claude Code process: fork/exec /home/melih/.claude/remote/ccd-cli/2.1.101: no such file or directory
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?

Environment

  • Claude Code Desktop version: 2.1.116 (Windows)
  • Remote server OS: Debian 13 (trixie), x86-64 Linux
  • Connection type: Remote Control via SSH

What happened

When using Claude Code Desktop on Windows to connect to a Linux VPS via Remote Control, the connection repeatedly fails with:

Failed to spawn Claude Code process: fork/exec /home/melih/.claude/remote/ccd-cli/2.1.101: no such file or directory

This failure persists for 1–2 minutes on every reconnect after idle, making the feature effectively unusable.

Root cause (reverse engineered)

Through strace, inotifywait, /proc inspection, and server log analysis, we identified the exact failure sequence:

  1. Desktop SSHes to VPS and uploads remote/server (the 5.9MB Go relay binary — correct, this is the Linux binary)
  2. remote/server starts and checks ~/.claude/remote/ccd-cli/ for the expected ccd-cli version
  3. The version doesn't match → server marks the binary as "being updated" internally
  4. Desktop tries to upload a replacement ccd-cli binary from its local machine (Windows) — this is a Windows PE binary, not a Linux ELF
  5. During the upload (or even just the attempt), the server's internal state marks 2.1.101 as unavailable
  6. Every process.spawn RPC call during this window returns fork/exec ... no such file or directory
  7. After ~2 minutes, the upload times out / is abandoned
  8. Server falls back to whatever exists in ccd-cli/ and spawning works again
  9. On next reconnect after idle, cycle repeats

Key evidence:

  • inotifywait watching the ccd-cli directory shows zero file events during failure window — the file is not actually deleted
  • SSH exec of the same binary from the same user succeeds during the failure window
  • The ENOENT comes from the server binary's internal state, not from the actual filesystem
  • The uploaded binary (when it completes) is a Windows PE file and cannot run on Linux

The fix needed

The Windows installer should ship claude-ssh-linux-amd64 (the Linux ccd-cli binary) alongside the Windows binary, and upload that to Linux VPS targets instead of the local Windows binary. This was previously requested in #26536 (closed as Not Planned).

Alternatively, the remote/server binary should detect the target OS and pull the appropriate binary from npm (@anthropic-ai/claude-code) which is already installed on the VPS, rather than uploading from the client.

Workaround

Manually copy the Linux binary from the npm package already installed on the VPS:

cp /usr/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe ~/.claude/remote/ccd-cli/2.1.116
cd ~/.claude/remote/ccd-cli && ln -sf 2.1.116 2.1.101

This must be re-applied after every Desktop auto-update that changes the expected version.

Expected behavior

Remote Control should work from Windows to Linux without manual binary management. The server should use the Linux binary already present on the VPS.

Additional context

  • The claude.exe binary in @anthropic-ai/claude-code/bin/ on Linux is actually a Linux ELF binary (the .exe extension is misleading) — it works perfectly as ccd-cli once placed in the right location
  • The remote/server relay binary IS correctly uploaded as a Linux binary — only the ccd-cli upload is broken
  • Related: #26536 (claude-ssh-linux-amd64 missing from Windows installer, closed Not Planned)

What Should Happen?

aDesktop Remote Control should work reliably on Windows → Linux VPS setups. Either: (a) the Windows Desktop installer should include the Linux ELF ccd-cli binary to upload to remote Linux servers, or (b) the server should detect the OS mismatch and skip the upload when the existing binary is already the correct architecture. Connection should succeed immediately without a 1-2 minute ENOENT failure window.

Error Messages/Logs

Failed to spawn Claude Code process: fork/exec /home/melih/.claude/remote/ccd-cli/2.1.101: no such file or directory

Steps to Reproduce

a1. Install Claude Code Desktop on Windows 2. Set up a Linux VPS (Debian/Ubuntu) with Claude Code installed via npm 3. 3. Configure Desktop to connect to the VPS via Remote Control 4. 4. Open any project in Desktop using Remote Control to the Linux VPS 5. 5. Send a message — observe "Failed to spawn Claude Code process: fork/exec ... no such file or directory" 6. 6. Wait ~2 minutes and try again — it works briefly, then fails again on next reconnect after idle

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.116 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The most likely fix is to include the Linux ELF ccd-cli binary in the Windows Desktop installer or modify the server to detect the OS mismatch and use the existing binary.

Guidance

  • Verify that the claude-ssh-linux-amd64 binary is not included in the Windows installer by checking the installation files.
  • Consider implementing a workaround by manually copying the Linux binary from the npm package to the correct location, as described in the issue.
  • Investigate modifying the remote/server binary to detect the target OS and pull the appropriate binary from npm instead of uploading from the client.
  • Test the connection after applying the workaround or implementing the fix to ensure it works reliably.

Example

cp /usr/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe ~/.claude/remote/ccd-cli/2.1.116
cd ~/.claude/remote/ccd-cli && ln -sf 2.1.116 2.1.101

This example shows how to manually copy the Linux binary to the correct location as a temporary workaround.

Notes

The issue is specific to the Windows Desktop installer and the remote/server binary's behavior when connecting to a Linux VPS. The fix or workaround may not apply to other platforms or configurations.

Recommendation

Apply the workaround by manually copying the Linux binary to the correct location, as this is a relatively simple and effective solution. This will allow for reliable connections until a more permanent fix can be implemented.

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…

FAQ

Expected behavior

Remote Control should work from Windows to Linux without manual binary management. The server should use the Linux binary already present on the VPS.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Remote Control (Windows Desktop → Linux VPS): ccd-cli upload fails with fork/exec ENOENT because Windows binary is sent to Linux server [1 comments, 2 participants]