[BUG] Claude Desktop App (Code tab) instantly disconnects when sending any prompt to remote VPS
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?
The Claude Desktop App's Code tab instantly disconnects the moment I send any prompt to my remote VPS. The connection to the VPS is established successfully (shows root@72.x.x.x: /root in the status bar), but the session drops immediately upon sending the first message. No error message is displayed — just a blank response and disconnection.
This started after a recent auto-update. The claude binary was missing from the VPS after the update (command not found), which I resolved by reinstalling via npm install -g @anthropic-ai/claude-code. However, the disconnection issue persists even after reinstallation.
What Should Happen?
The prompt should be processed and a response returned, just like it works via SSH terminal.
Error Messages/Logs
Steps to Reproduce
Open Claude Desktop App on macOS
Navigate to the Code tab
Connect to remote VPS (connection establishes successfully, status bar shows VPS address)
Start a new session
Type any prompt (e.g., "hey") and press Enter
Result: Session disconnects immediately — blank response, no error message
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.79
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
What I've Tried (all unsuccessful)
Started multiple new sessions — same result every time
Reinstalled Claude Code on VPS — npm uninstall -g @anthropic-ai/claude-code → rm -rf ~/.claude/ ~/.claude.json → npm install -g @anthropic-ai/claude-code — version 2.1.79 confirmed working
Disabled MCP servers — renamed .mcp.json to .mcp.json.bak — no change
Reinstalled Claude Desktop App on macOS — deleted app, downloaded fresh from claude.ai/download — no change
Verified VPS resources — disk 32% used, memory 7% used, no resource issues
Re-authenticated — logged out and back in
Key Diagnostic Finding
Claude Code works perfectly when accessed via SSH terminal:
ssh root@72.x.x.x
claude
hi
● Hi! How can I help you today?
This confirms:
Claude Code installation is fine
Authentication is fine
VPS resources are fine
The issue is specifically with the Desktop App's remote connection to the VPS
Additional Context
The Chat tab in the Desktop App works perfectly — only the Code tab is affected
The VPS has a Google Analytics MCP server configured, but disabling it made no difference
The .claude/settings.local.json has a large permissions allow-list (built up over months of usage)
The issue began after an auto-update that also removed the claude binary from the VPS
VPS System Info
System load: 0.54
Usage of /: 31.9% of 193.65GB
Memory usage: 7% (1.3GB of 15GB used)
Swap usage: 0%
Processes: 170
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗