openclaw - 💡(How to fix) Fix [Bug]: macOS: agent exec / gateway exec cannot reach SSH host, while terminal and direct runExecProcess work [1 participants]

Official PRs (…)
ON THIS PAGE

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
openclaw/openclaw#61713Fetched 2026-04-08 02:55:29
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

After upgrading to 2026.4.2 (d74a122) on macOS, OpenClaw agent/gateway exec can no longer reach an SSH NAS target ("No route to host"), while the same host succeeds from Terminal, direct Node spawn, and direct bundled runExecProcess.

Root Cause

After upgrading to 2026.4.2 (d74a122) on macOS, OpenClaw agent/gateway exec can no longer reach an SSH NAS target ("No route to host"), while the same host succeeds from Terminal, direct Node spawn, and direct bundled runExecProcess.

Fix Action

Fix / Workaround

I confirmed a separate PATH regression in gateway exec and hot-patched it locally. I also tested a deeper local hotfix for direct argv spawning of simple commands. Even after those mitigations, real OpenClaw agent exec still fails, while direct bundled runExecProcess(...) succeeds. That narrows the issue further to the upper exec orchestration layer, not the low-level runtime itself.

Code Example

Relevant evidence:

- OpenClaw version: `2026.4.2`
- Platform: macOS
- Gateway mode: local launch agent
- `tools.exec.host = "gateway"`

Observed only inside OpenClaw agent/gateway exec:


ssh: connect to host 192.168.0.181 port 22: No route to host
nc: connectx to 192.168.0.181 port 22 (tcp) failed: No route to host

But all of the following succeed outside the OpenClaw agent exec path:

Terminal: ssh nas
Unrestricted equivalent env: env -i ... /usr/bin/ssh -o ConnectTimeout=5 nas ...
Direct Node spawn: spawn('/usr/bin/ssh', ...)
Direct bundled OpenClaw runtime call: runExecProcess(...)
This strongly suggests the bug is in the higher-level OpenClaw agent -> exec tool -> gateway path, not in the NAS, SSH config, or host machine network.

Additional local findings:

I confirmed a separate PATH regression in gateway exec and hot-patched it locally.
I also tested a deeper local hotfix for direct argv spawning of simple commands.
Even after those mitigations, real OpenClaw agent exec still fails, while direct bundled runExecProcess(...) succeeds.
That narrows the issue further to the upper exec orchestration layer, not the low-level runtime itself.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading to 2026.4.2 (d74a122) on macOS, OpenClaw agent/gateway exec can no longer reach an SSH NAS target ("No route to host"), while the same host succeeds from Terminal, direct Node spawn, and direct bundled runExecProcess.

Steps to reproduce

  1. On macOS, set tools.exec.host = "gateway" and configure an SSH alias nas that works from Terminal.
  2. Verify /usr/bin/ssh -o ConnectTimeout=5 nas "echo TERMINAL_OK" succeeds in Terminal.
  3. Ask an OpenClaw agent to run /usr/bin/ssh -o ConnectTimeout=5 nas "echo OPENCLAW_OK".
  4. Observe ssh: connect to host 192.168.0.181 port 22: No route to host.
  5. Ask the agent to run /usr/bin/nc -vz 192.168.0.181 22 and observe the same failure.

Expected behavior

OpenClaw agent/gateway exec should behave the same as the host Terminal for the same SSH/TCP target. Running /usr/bin/ssh -o ConnectTimeout=5 nas "echo OK" or /usr/bin/nc -vz 192.168.0.181 22 should succeed, just as they do from Terminal, direct Node spawn, and direct bundled runExecProcess.

Actual behavior

OpenClaw agent/gateway exec fails only inside the OpenClaw tool path. /usr/bin/ssh -o ConnectTimeout=5 nas "echo OK" returns "ssh: connect to host 192.168.0.181 port 22: No route to host", and /usr/bin/nc -vz 192.168.0.181 22 returns "nc: connectx to 192.168.0.181 port 22 (tcp) failed: No route to host". The same host, same SSH config, and equivalent environment succeed outside the OpenClaw agent exec path.

OpenClaw version

OpenClaw 2026.4.2 (d74a122)

Operating system

macOS 26.3.1

Install method

npm global

Model

minimax-2.7 / gpt-5.4

Provider / routing chain

openclaw -> local gateway -> agent exec tool (host=gateway) -> /usr/bin/ssh -> NAS

Additional provider/model setup details

This issue is not model-provider specific. The failing path is OpenClaw agent exec on macOS: openclaw -> local gateway -> exec(host=gateway) -> /usr/bin/ssh -> NAS.

Logs, screenshots, and evidence

Relevant evidence:

- OpenClaw version: `2026.4.2`
- Platform: macOS
- Gateway mode: local launch agent
- `tools.exec.host = "gateway"`

Observed only inside OpenClaw agent/gateway exec:


ssh: connect to host 192.168.0.181 port 22: No route to host
nc: connectx to 192.168.0.181 port 22 (tcp) failed: No route to host

But all of the following succeed outside the OpenClaw agent exec path:

Terminal: ssh nas
Unrestricted equivalent env: env -i ... /usr/bin/ssh -o ConnectTimeout=5 nas ...
Direct Node spawn: spawn('/usr/bin/ssh', ...)
Direct bundled OpenClaw runtime call: runExecProcess(...)
This strongly suggests the bug is in the higher-level OpenClaw agent -> exec tool -> gateway path, not in the NAS, SSH config, or host machine network.

Additional local findings:

I confirmed a separate PATH regression in gateway exec and hot-patched it locally.
I also tested a deeper local hotfix for direct argv spawning of simple commands.
Even after those mitigations, real OpenClaw agent exec still fails, while direct bundled runExecProcess(...) succeeds.
That narrows the issue further to the upper exec orchestration layer, not the low-level runtime itself.

Impact and severity

Affected: macOS users relying on OpenClaw agent/gateway exec for SSH-based NAS access Severity: High (core exec workflow is unreliable for remote host operations) Frequency: Reproduced consistently after upgrading to 2026.4.2 Consequence: OpenClaw cannot perform SSH/NAS tasks that work correctly from Terminal and direct runtime execution

Additional information

No response

extent analysis

TL;DR

The OpenClaw agent/gateway exec fails to reach an SSH NAS target after upgrading to version 2026.4.2 on macOS, likely due to a regression in the exec orchestration layer.

Guidance

  • Verify that the tools.exec.host configuration is correctly set to "gateway" and that the SSH alias "nas" is properly configured and working from Terminal.
  • Investigate the differences in environment and networking configuration between the OpenClaw agent/gateway exec path and the direct Node spawn or bundled runExecProcess paths, which are succeeding.
  • Check for any recent changes in the OpenClaw codebase that may have introduced this regression, particularly in the exec orchestration layer.
  • Consider downgrading to a previous version of OpenClaw or applying a hotfix to mitigate the issue until a permanent fix is available.

Example

No specific code example is provided, as the issue appears to be related to the OpenClaw configuration and environment rather than a specific code snippet.

Notes

The issue seems to be specific to the OpenClaw agent/gateway exec path on macOS, and the fact that direct Node spawn and bundled runExecProcess are succeeding suggests that the problem lies in the higher-level exec orchestration layer. Further investigation is needed to determine the root cause of the regression.

Recommendation

Apply a workaround, such as downgrading to a previous version of OpenClaw or using an alternative exec path, until a permanent fix is available. This is because the issue is causing a high-severity impact on macOS users relying on OpenClaw agent/gateway exec for SSH-based NAS access.

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…

FAQ

Expected behavior

OpenClaw agent/gateway exec should behave the same as the host Terminal for the same SSH/TCP target. Running /usr/bin/ssh -o ConnectTimeout=5 nas "echo OK" or /usr/bin/nc -vz 192.168.0.181 22 should succeed, just as they do from Terminal, direct Node spawn, and direct bundled runExecProcess.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING