claude-code - 💡(How to fix) Fix SSH Code: "Ambiguous output redirect" on remote servers with csh/tcsh default shell [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46055Fetched 2026-04-11 06:30:10
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Claude Desktop SSH Code fails to probe remote machines that use csh/tcsh as the default shell. The error occurs during the probe phase, before any CLI deployment. Error message in UI: Failed to probe remote machine: Ambiguous output redirect. Try again This worked correctly in the previous version. After updating Claude Desktop, all new sessions fail with this error. Existing sessions from before the update still work fine.

Root Cause

The remote server uses /bin/csh as the default shell (common in semiconductor/EDA industry). The probe command sent by Claude Desktop likely contains bash-specific syntax that is incompatible with csh.

Fix Action

Workaround

Existing sessions from before the update continue to work. Changing the default shell to bash is not feasible in enterprise environments where csh is required by toolchains.

Code Example

[SSH2Connection] Connected to server:4543
[RemoteServerController] Connection failed (4991ms): Failed to probe remote machine: Ambiguous output redirect.
RAW_BUFFERClick to expand / collapse

Bug Description

Claude Desktop SSH Code fails to probe remote machines that use csh/tcsh as the default shell. The error occurs during the probe phase, before any CLI deployment.

Error message in UI: Failed to probe remote machine: Ambiguous output redirect. Try again

Also shows: Path is invalid. when attempting to select a remote folder.

Regression

This worked correctly in the previous version. After updating Claude Desktop, all new sessions fail with this error. Existing sessions from before the update still work fine.

Environment

  • Claude Desktop: latest (updated 2026-04-10)
  • macOS: 26.0.1 (arm64, Apple M4)
  • Remote server default shell: /bin/csh
  • SSH connection itself succeeds (confirmed in ssh.log)

SSH Log

[SSH2Connection] Connected to server:4543
[RemoteServerController] Connection failed (4991ms): Failed to probe remote machine: Ambiguous output redirect.

The SSH connection is established successfully every time. The failure happens when the probe command is executed on the remote shell — csh does not support bash-style stderr redirection (2>/dev/null), which causes "Ambiguous output redirect".

Root Cause

The remote server uses /bin/csh as the default shell (common in semiconductor/EDA industry). The probe command sent by Claude Desktop likely contains bash-specific syntax that is incompatible with csh.

Suggested Fix

Wrap the probe command with bash -c '...' or detect the remote shell before probing.

Workaround

Existing sessions from before the update continue to work. Changing the default shell to bash is not feasible in enterprise environments where csh is required by toolchains.

extent analysis

TL;DR

Wrap the probe command with bash -c '...' to ensure compatibility with the remote server's default shell.

Guidance

  • Verify that the SSH connection is successful by checking the ssh.log for a successful connection message, such as [SSH2Connection] Connected to server:4543.
  • Check the probe command sent by Claude Desktop to identify any bash-specific syntax that may be causing the incompatibility with csh.
  • Consider detecting the remote shell before probing to determine the best approach for executing the probe command.
  • As a temporary workaround, use existing sessions that were created before the update, as they are not affected by this issue.

Example

# Example of wrapping the probe command with bash -c '...'
probe_command="bash -c 'your_probe_command_here'"

Notes

This solution assumes that the remote server has bash installed and available for use. If bash is not available, an alternative approach may be needed.

Recommendation

Apply workaround: Wrap the probe command with bash -c '...' to ensure compatibility with the remote server's default shell, as changing the default shell to bash is not feasible in the given enterprise environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix SSH Code: "Ambiguous output redirect" on remote servers with csh/tcsh default shell [1 comments, 2 participants]