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

Status Fixed / completed
Reported on v2.1.44
Maintainer reply None cached
Activity 3 comments · opened Feb 17, 2026 · 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 ↗

3 Comments

github-actions[bot] · 7 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/26414
  2. https://github.com/anthropics/claude-code/issues/26413

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

tvancott42 · 7 months ago

Duplicate of #26413

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.