#Possible to force an agent to use exec only on a specific Node?

1 messages · Page 1 of 1 (latest)

glad zodiac
#

Hi, I've given node exec rights to one of my agents, but it still seems to want to run commands on the gateway.

Checked the docs, but wasn't really sure how to dial this in.... am I missing something?

umbral fiberBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

onyx quailBOT
#

exec doesn’t “prefer nodes” just because a node exists (or because you approved system.run on the node). By default it’ll run wherever tools.exec.host points (and in older versions, host=sandbox could silently fall back to running on the gateway when sandboxing is off).

First: what version are you on? (openclaw --version) — exec host routing changed a bit recently.

Make exec run on a node (and pin it to one node)

  1. Find your node id/name:
openclaw nodes list
openclaw nodes status
  1. Set exec defaults (global), or per-agent.

Global (everything uses the node by default):

openclaw config set tools.exec.host node
#
openclaw config set tools.exec.node "<id-or-name>"

Per-agent (only one agent uses the node):

openclaw config get agents.list
openclaw config set agents.list[0].tools.exec.host node
openclaw config set agents.list[0].tools.exec.node "<id-or-name>"
  1. (Optional but recommended) keep it in allowlist mode:
openclaw config set tools.exec.security allowlist

…and then allowlist commands on the node host via approvals.

#

Quick per-session override (no config write)

In chat (if you’re an authorized sender):

/exec host=node node=<id-or-name>

If it still runs on the gateway

  • Check you didn’t previously set /elevated on or /exec host=gateway in that session.
  • Paste the output of:
    • openclaw --version
    • openclaw config get tools.exec
    • openclaw nodes list

Docs:

glad zodiac