Summary
openclaw gateway probe reports "Unconventional setup: multiple reachable gateways detected" when there is a single logical gateway but two successful probe transports (SSH tunnel + direct WebSocket URL to the same host).
Symptom
- With
gateway.mode=remote, gateway.remote.sshTarget set (SSH tunnel succeeds), and gateway.remote.url pointing at the same logical gateway over a direct path (e.g. ws://chromebox:18789), the probe succeeds for both targets but emits a multiple gateways warning.
- Both probe targets succeed; behavior matches one gateway, two transports, not two distinct gateways.
Context
buildGatewayStatusWarnings treats reachable.length > 1 as multiple gateways. When an SSH tunnel target is in play, the probe includes both the tunnel URL and the configured gateway.remote.url, so two successes can mean redundant paths to one identity—not two separate gateway instances.
Relevant upstream sources (current main):
Environment
- OpenClaw: 2026.4.15 (Homebrew); bundled
gateway-status-B2JeYHAg.js contains the same logic (e.g. line ~408 for targets construction).
- Client: macOS (thin client)
- Gateway: Linux (remote)
Expected behavior
Either:
- No warning when all reachable targets resolve to the same gateway identity (
self / presence from pickGatewaySelfPresence), or
- A clearer warning that distinguishes "same gateway, multiple transports" from "multiple distinct gateways".
Actual behavior
A misleading multiple_gateways warning despite a single logical gateway.
Possible fixes
- Dedupe by gateway identity — Before emitting
multiple_gateways, collapse reachable entries that share the same non-null identity key (e.g. normalized host + ip from pickGatewaySelfPresence). Only warn when ≥ 2 distinct identities (define policy for probes with self == null).
- Skip redundant
configRemote when tunnel is active — Narrower change; tradeoff: loses automatic direct-path check unless probe --url or explicit second target is used.
- Improve warning copy — If
reachable.length > 1 but identities match, downgrade to an informational line instead of "multiple gateways."
Repro steps
- On the client, configure remote mode with both SSH tunnel target and direct URL to the same gateway (placeholders only):
{
"gateway": {
"mode": "remote",
"remote": {
"sshTarget": "user@gateway-host",
"url": "ws://gateway-host:18789",
"token": "${OPENCLAW_GATEWAY_TOKEN}"
}
}
}
- Ensure SSH resolves (e.g.
~/.ssh/config Host entry) and the direct ws:// URL is reachable on the LAN.
- Run:
openclaw gateway probe
- Observe two successful targets (e.g. Remote over SSH
ws://127.0.0.1:18789 and Remote (configured) ws://gateway-host:18789) plus the multiple-gateways warning.
Tests
Existing: src/commands/gateway-status/helpers.test.ts. Consider adding output.test.ts (or extending an existing suite) for buildGatewayStatusWarnings / multiple_gateways when two probes share identity.
Docs
Warning currently references: Gateway — multiple gateways same host
Suggested labels
bug, cli, gateway
Summary
openclaw gateway probereports "Unconventional setup: multiple reachable gateways detected" when there is a single logical gateway but two successful probe transports (SSH tunnel + direct WebSocket URL to the same host).Symptom
gateway.mode=remote,gateway.remote.sshTargetset (SSH tunnel succeeds), andgateway.remote.urlpointing at the same logical gateway over a direct path (e.g.ws://chromebox:18789), the probe succeeds for both targets but emits a multiple gateways warning.Context
buildGatewayStatusWarningstreatsreachable.length > 1as multiple gateways. When an SSH tunnel target is in play, the probe includes both the tunnel URL and the configuredgateway.remote.url, so two successes can mean redundant paths to one identity—not two separate gateway instances.Relevant upstream sources (current
main):runGatewayStatusProbePassbuildstargetsas tunnel first, thenbaseTargetsfiltered only by matching URL (same gateway, different URL is not deduped).buildGatewayStatusWarnings→multiple_gatewayswhenreachable.length > 1with no identity check.resolveTargets.Environment
gateway-status-B2JeYHAg.jscontains the same logic (e.g. line ~408 fortargetsconstruction).Expected behavior
Either:
self/ presence frompickGatewaySelfPresence), orActual behavior
A misleading
multiple_gatewayswarning despite a single logical gateway.Possible fixes
multiple_gateways, collapse reachable entries that share the same non-null identity key (e.g. normalizedhost+ipfrompickGatewaySelfPresence). Only warn when ≥ 2 distinct identities (define policy for probes withself == null).configRemotewhen tunnel is active — Narrower change; tradeoff: loses automatic direct-path check unlessprobe --urlor explicit second target is used.reachable.length > 1but identities match, downgrade to an informational line instead of "multiple gateways."Repro steps
{ "gateway": { "mode": "remote", "remote": { "sshTarget": "user@gateway-host", "url": "ws://gateway-host:18789", "token": "${OPENCLAW_GATEWAY_TOKEN}" } } }~/.ssh/configHostentry) and the directws://URL is reachable on the LAN.openclaw gateway probews://127.0.0.1:18789and Remote (configured)ws://gateway-host:18789) plus the multiple-gateways warning.Tests
Existing: src/commands/gateway-status/helpers.test.ts. Consider adding
output.test.ts(or extending an existing suite) forbuildGatewayStatusWarnings/multiple_gatewayswhen two probes share identity.Docs
Warning currently references: Gateway — multiple gateways same host
Suggested labels
bug,cli,gateway