[BUG] Claude Code hangs on all subprocess commands when running inside SSH session on Windows

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Aug 2, 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?

Environment: Claude Code 2.1.220, Windows 11, SSH Session

Issue: When I SSH into my Windows machine from my Mac using Terminal or iPhone, then launch Claude Code in that SSH session, Claude cannot execute any commands. Even simple commands like "echo hello" hang and time out after 2 minutes with exit code 143.

Actual behaviour: All subprocess execution hangs indefinitely. PowerShell times out, no output captured.

Key observation: The same commands run instantly if I execute them manually in the terminal outside of Claude Code, in the identical SSH session. Additionally, Claude Code works perfectly when launched directly on Windows without SSH involved.

This appears to be a subprocess spawning issue specific to Claude Code running in an SSH-reached session on Windows, not related to SSH keys, agent forwarding, or authentication.

What Should Happen?

Expected behaviour: Commands should execute normally, just as they do outside Claude Code.

Error Messages/Logs

Time out and hang. 2 minutes. Exit code 143.

Steps to Reproduce

  1. SSH into Windows machine.
  2. Launch Claude Code (version 2.1.220).
  3. Ask Claude to run any command like "echo hello".
  4. Command hangs and times out.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.220

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Everything is straight forward. Other bug reports exist, however this bug report has to do with Claudes environment itself. Claude cannot run any command through SSH into Windows.

View original on GitHub ↗