[BUG] Claude Code desktop app gets stuck and progresses indefinitely when connected via SSH on Windows

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Feb 20, 2026 · closed Feb 23, 2026

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?

I successfully connected to my Docker container via SSH in Claude Code desktop app for Windows. I successfully chose the working directory. However, when I write my initial prompt and execute it, the conversation gets stuck. The progressing status is shown, but I do not get any answer/output. No matter what prompt I write, no matter what model I use.

This is happening only when connected via SSH. In Local mode, everything works fine.

What Should Happen?

When I type a prompt, Claude Code should return some answer/output. It shouldn't get stuck.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code desktop app for Windows
  2. Open Code mode
  3. Connect to a Docker container via SSH
  4. Select a working folder
  5. Type a prompt (nothing works, no matter what prompt I write, no matter what model I use)
  6. Conversation gets stuck, and no answer is provided

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.1.3770

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

<img width="857" height="476" alt="Image" src="https://github.com/user-attachments/assets/b4ec8a39-720f-440f-b9ff-68f46548d0e5" />

View original on GitHub ↗

4 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/25664
  2. https://github.com/anthropics/claude-code/issues/26536
  3. https://github.com/anthropics/claude-code/issues/26116

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

petrnohejl · 7 months ago

Claude Code Desktop SSH Hangs Indefinitely on Windows → Alpine Linux (LinuxServer.io Container)

Environment

  • Client: Claude Code Desktop for Windows
  • Remote: Alpine Linux (LinuxServer.io Docker container)
  • Connection: SSH via PuTTY

Problem

After successfully connecting to the Alpine Linux container via SSH in Claude Code Desktop and selecting a working directory, every prompt would hang indefinitely showing a progress indicator. No response was ever returned, regardless of the model or prompt used. Local mode worked fine.

Root Cause

The Alpine Linux container was missing several dependencies required by Claude Code:

  1. Missing packages: Alpine is a musl-based distribution that requires libgcc, libstdc++, and ripgrep for Claude Code to function. Without these, Claude Code's shell tools hang silently.
  2. PATH and environment not configured: The USE_BUILTIN_RIPGREP=0 environment variable and correct PATH entries were missing.
  3. User permissions: The default LinuxServer.io container user lacked sudo privileges, making it impossible to install packages via SSH.

Fix (Step-by-Step)

1. Get a root shell via Docker (from the host machine):

docker exec -it <container_name> /bin/sh

2. Install required packages:

apk update
apk add bash libgcc libstdc++ ripgrep git curl shadow sudo

3. Grant the SSH user sudo access:

echo "linuxserver.io ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

4. Set correct ownership on the user's .bashrc:

chown linuxserver.io:linuxserver.io /config/.bashrc

5. Exit the root shell, then via SSH (PuTTY), configure the environment:

cat >> /config/.bashrc << 'EOF'
export USE_BUILTIN_RIPGREP=0
export PATH="$HOME/.local/bin:$PATH"
export LANG=C.UTF-8
EOF
source /config/.bashrc

After these steps, Claude Code Desktop SSH sessions to the Alpine container work correctly.

Notes

  • The default shell for the linuxserver.io user was already set to /bin/bash — if yours is /bin/ash or /bin/sh, you'll also need to change it with chsh -s /bin/bash <username>.
  • The key insight is that Alpine's minimal base image ships without the libraries and tools Claude Code silently depends on, causing it to hang rather than error out.
petrnohejl · 7 months ago

I found that Claude Code actually doesn't need to be installed inside the Linux container. There's no Claude binary anywhere on the filesystem, and it works without it. I am running Claude Code on my Windows/WSL host machine, and it's connecting into this Docker container as a sandboxed workspace. Claude Code itself doesn't need to be inside the container. It runs on the host and executes tools (shell commands, file reads/edits) against the container remotely. Claude Code lives on my host, the container is just the isolated execution environment.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.