[BUG] ccd-cli daemon exits with code 1 due to non-interactive trusted-folder prompt
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?
After connecting to a fresh VPS via the SSH Remote feature in Claude Desktop, sending any prompt fails immediately with:
Something went wrong. Try sending your message again. If it keeps happening, share feedback so we can investigate. Claude Code process exited with code 1
The connection itself is healthy — server.ping RPCs in ~/.claude/remote/remote-server.log succeed continuously. The failure happens specifically when the daemon spawns the ccd-cli binary on the remote machine.
Root cause (confirmed): the SSH Remote daemon spawns ~/.claude/remote/ccd-cli/<version> as a subprocess without a TTY. The binary then tries to display the interactive "Quick safety check: Is this a project you trust?" prompt, fails because there's no TTY, and exits with code 1 — before the desktop client's first stdin payload (the user's prompt) can be delivered.
The desktop UI surfaces only the generic "exit code 1" message, with no indication that an interactive trust prompt is the underlying cause. This makes the bug effectively undiagnosable from the UI alone.
What Should Happen?
Any of the following would fix this:
- The SSH Remote daemon should mark the workspace as trusted before spawning
ccd-cli(since the user already authorized the connection in the desktop UI). ccd-clishould detect non-interactive stdin and either auto-trust (controlled by an env var likeCLAUDE_TRUST_REMOTE=1) or surface the trust requirement back to the desktop UI for confirmation.- At minimum, the desktop UI should surface stderr from the spawned process instead of replacing it with a generic
exit code 1message — this alone would have made the bug self-diagnosable.
Error Messages/Logs
markdownRelevant lines from `~/.claude/remote/remote-server.log` at the moment of failure:
2026/04/28 16:19:39 [Server] RPC request: method=process.spawn, id=184
2026/04/28 16:19:39 [process.Manager] Process dbc322fd-... started, PID=30237,
command=/home/claudeuser/.claude/remote/ccd-cli/2.1.119
2026/04/28 16:19:39 [process.Manager] Starting stdout streaming for process dbc322fd-...
2026/04/28 16:19:39 [process.Manager] Starting stderr streaming for process dbc322fd-...
2026/04/28 16:19:40 [process.Manager] Process dbc322fd-... exited with code 1
2026/04/28 16:19:40 [Server] RPC request: method=process.stdin, id=185
2026/04/28 16:19:40 [process.Manager] WriteStdin called for process dbc322fd-... with 18542 bytes
2026/04/28 16:19:40 [process.Manager] WriteStdin: process dbc322fd-... not running
Reproducing the failure manually with `~/.claude/remote/ccd-cli/2.1.119 < /dev/null` reveals what the daemon-spawned subprocess sees but cannot display:
Accessing workspace: /home/claudeuser
Quick safety check: Is this a project you created or one you trust?
❯ 1. Yes, I trust this folder
2. No, exit
Exit code: 1. The same binary run interactively (with a TTY) exits with code 0.
Steps to Reproduce
- Provision a fresh Ubuntu 25.04 VPS, create a non-root user (e.g.
claudeuser). - In Claude Desktop on macOS, set up an SSH Remote connection to the VPS.
- Let the desktop push the
ccd-clibinary to~/.claude/remote/ccd-cli/<version>on the remote. - Connection succeeds — pings work.
- Send any prompt in the SSH Remote session.
- Observe:
Claude Code process exited with code 1.
Workaround: SSH into the VPS as the same user, run the binary interactively from the workspace directory the desktop is using, accept the trust prompt, exit, then reconnect from desktop:
cd /home/
~/.claude/remote/ccd-cli/
# select "1. Yes, I trust this folder", then /exit
Subsequent prompts from the desktop UI then work.
Claude Model: Opus 4.7 (1M context)
Is this a regression? No / Don't know (first time using SSH Remote feature)
Last Working Version: N/A
Claude Code Version: 2.1.119 (Claude Desktop embedded) / 2.1.121 (system on VPS)
Platform: Claude Max subscription (OAuth)
Operating System: macOS (client) / Ubuntu 25.04 (remote VPS)
Terminal/Shell: Claude Desktop app (SSH Remote) — bash on remote (claudeuser)
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.114 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Possibly related issues:
- #36739 — Remote SSH connection fails on root VPS after client update 1.1.7714
- #46845 — SSH Remote Code tab fails on first-run VPS
- #50698 — Remote SSH daemon exits with code 1 on initialize
- #37434 — SSH Mode fails when connecting as Root
Environment details:
- Remote Node.js: v22.22.2
- Remote Claude Code (system, separate from
ccd-cli): 2.1.121 at/usr/bin/claude - Remote
ccd-clibinary: 245 MB at~/.claude/remote/ccd-cli/2.1.119 - Connecting as non-root user (also reproduced as root — same error)
Full remote-server.log and reproduction transcript available on request.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗