-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
[Bug]: Agent shell tool ignores /exec host=node and still runs in container #85012
Copy link
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
After
/exec host=node node=<remote-macos-node> security=full ask=off, agent shell/exec commands still execute in the gateway/container Linux environment instead of the selected macOS node.Steps to reproduce
<remote-macos-node>./exec host=node node=<remote-macos-node> ...flow.Expected behavior
When the session exec defaults select
host=nodeandnode=<remote-macos-node>, subsequent agent shell/exec tool calls in that session should execute on the selected macOS node and reportDarwin/ the node environment.The gateway/container should remain the default runtime for sessions without this explicit
/exec host=node ...session override.Actual behavior
The
/execcommand is accepted and the session appears to have the node exec default set, but the next available agent shell tool still executes in the Linux container on the gateway host.Observed output from the shell command:
Restarting TUI did not change the result. A fresh TUI session also still returned
Linuxafter setting/exec host=node node=<remote-macos-node> ....OpenClaw version
2026.5.12
Operating system
Gateway/runtime: Linux container host
Node: macOS node
Client: TUI over SSH
Install method
Gateway/container runtime; exact install method not verified from this report.
Model
openai/gpt-5.5
Provider / routing chain
TUI → OpenClaw gateway/session on Linux gateway/container host → OpenAI Codex agent runtime/tool bridge → agent shell/exec command
Additional provider/model setup details
The TUI status line shows
Runtime: OpenAI Codex/openai/gpt-5.5. This appears to refer to the OpenAI OAuth/provider runtime used by OpenClaw, not the Codex CLI.Logs, screenshots, and evidence
Related prior issue: #20669 reported the same class of failure (
Agent exec ignores node binding — always routes to gateway despite correct config). That issue was closed as stale/not planned, with the bot saying to open a new issue with fresh repro steps if it still happens on a later release. This is a fresh repro on 2026.5.12.Impact and severity
Affected: users who want OpenClaw to keep gateway/container as the default runtime while allowing the agent to explicitly use a paired local or remote node for node-local work.
Severity: High for multi-node workflows. The user can connect and configure a macOS node, but the agent shell path does not honor the session node routing and still runs in the gateway/container.
Frequency: 100% in the observed tests: same session after restart and fresh session both returned Linux after
/exec host=node node=<remote-macos-node>.Consequence: node-local files/apps/environment cannot be accessed through the normal agent shell execution path. The setup can only use separate node/file-transfer surfaces, while the main shell tool remains bound to the gateway/container.
Additional information
A likely source-level area to inspect is the bridge between session exec defaults and the OpenAI Codex agent runtime's
exec_commandshell tool. The generic OpenClaw exec docs implyhost=nodeis supported, but the observed shell tool appears to spawn in the local container instead of going through the node exec router.This report is intentionally limited to the observed behavior. I have not confirmed whether direct CLI
openclaw nodes run --node <remote-macos-node> ...succeeds in this exact environment.