[BUG] Bash tool returns "Exit code 1" / "(No output)" for SSH commands on Windows - regression in 2.1.45

Resolved 💬 3 comments Opened Feb 17, 2026 by tvancott42 Closed Feb 17, 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?

The Bash tool fails to capture output for SSH commands on Windows, returning either "(No output)" or "Error: Exit code 1". Simple local commands like npm -v work fine in the same session, but SSH commands consistently fail.

Downgrading to 2.1.44 resolved the issue. Same machine, same shell, same environment.

What Should Happen?

SSH commands should execute and return their output normally, as they do on 2.1.44.

Error Messages/Logs

● Bash(ssh user@remote-host "echo 'SSH test successful' && uname -a")
  ⎿  (No output)

● Bash(ssh -v user@remote-host "echo hello" 2>&1 | tail -20)
  ⎿  Error: Exit code 1

● Bash(ssh -o ConnectTimeout=5 user@remote-host "echo hello" 2>&1; echo "EXIT: $?")
  ⎿  Error: Exit code 1

● Bash(npm -v)
  ⎿  11.8.0          <-- this one worked

After downgrading to 2.1.44, the same SSH command works immediately:

● Bash(ssh user@remote-host "echo 'SSH test successful' && uname -a")
  ⎿  SSH test successful
     Darwin [hostname] 23.6.0 Darwin Kernel Version 23.6.0 ... RELEASE_ARM64_T6000 arm64

Steps to Reproduce

  1. Install Claude Code 2.1.45 on Windows
  2. Run any SSH command via the Bash tool (e.g., ssh user@host "echo hello")
  3. Observe "(No output)" or "Error: Exit code 1"
  4. Verify simple commands like npm -v still work
  5. Downgrade to 2.1.44 to confirm it resolves

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.44

Claude Code Version

2.1.45

Platform

Anthropic API

Operating System

Windows 11

Terminal/Shell

Windows Terminal (Git Bash)

Additional Information

Related but distinct from #21915 (persistent, older version) and #21143 (closed, older version). This is specific to SSH commands on 2.1.45.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗