openclaw - 💡(How to fix) Fix [Bug]: exec(host=node) rejects same node when bound and requested selectors differ

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…

exec(host=node) can reject a valid request when the configured bound node and the requested node refer to the same physical node using different supported selector forms.

For example, tools.exec.node / boundNode may be configured as the canonical full node ID, while the model or caller requests the same node by display name such as home-wsl-debian. The current guard compares those raw strings before resolving either selector, so the request fails even though both values identify the same node.

Error Message

throw new Error(exec node not allowed (bound to ${params.boundNode}));

Root Cause

The request is rejected before node resolution because boundNode and requestedNode are compared as raw strings:

Fix Action

Workaround

Use the exact same selector string as the configured tools.exec.node, or omit the per-call node parameter and let the configured bound node be used. For example, if tools.exec.node is a full node ID, using the display name in the exec request can trigger this bug.

Code Example

exec node not allowed (bound to <full-node-id>)

---

if (params.boundNode && params.requestedNode && params.boundNode !== params.requestedNode) {
  throw new Error(`exec node not allowed (bound to ${params.boundNode})`);
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (valid node execution request is rejected)

Summary

exec(host=node) can reject a valid request when the configured bound node and the requested node refer to the same physical node using different supported selector forms.

For example, tools.exec.node / boundNode may be configured as the canonical full node ID, while the model or caller requests the same node by display name such as home-wsl-debian. The current guard compares those raw strings before resolving either selector, so the request fails even though both values identify the same node.

Minimal repro

  1. Pair a node with a display name, for example home-wsl-debian.
  2. Configure tools.exec.node to that node's full canonical node ID.
  3. Run an exec request with host=node and node=home-wsl-debian.
  4. Observe the request fail before execution:
exec node not allowed (bound to <full-node-id>)

Expected behavior

The bound node and requested node should be resolved through the existing node resolver first. If both selectors resolve to the same canonical node ID, the request should be allowed.

Actual behavior

The request is rejected before node resolution because boundNode and requestedNode are compared as raw strings:

if (params.boundNode && params.requestedNode && params.boundNode !== params.requestedNode) {
  throw new Error(`exec node not allowed (bound to ${params.boundNode})`);
}

This still exists on current main at 6afe3e89523d0abc94d15c831033652d7afcb81e in src/agents/bash-tools.exec-host-node-phases.ts.

Why this is a bug

OpenClaw config/docs allow node selectors such as node-id-or-name, and the shared node resolver supports full node IDs, display names, remote IPs, and ID prefixes. The bound-node guard should enforce node identity after canonicalization, not compare raw selector text.

Workaround

Use the exact same selector string as the configured tools.exec.node, or omit the per-call node parameter and let the configured bound node be used. For example, if tools.exec.node is a full node ID, using the display name in the exec request can trigger this bug.

Related

  • Observed manifestation with stale display-name requests: #61229
  • Proposed fix with regression tests: #66985

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

The bound node and requested node should be resolved through the existing node resolver first. If both selectors resolve to the same canonical node ID, the request should be allowed.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: exec(host=node) rejects same node when bound and requested selectors differ