From 3efafab21bd5d14bac5f82bbfd5a91b7a9af921c Mon Sep 17 00:00:00 2001 From: Felipe Date: Sat, 7 Mar 2026 08:20:37 +0100 Subject: [PATCH] fix(nodes): remove redundant rawCommand from system.run.prepare The nodes tool was passing rawCommand: formatExecCommand(command) to system.run.prepare, which produced the full formatted argv string (e.g. 'powershell -Command "echo hello"'). However, validateSystemRunCommandConsistency() recognizes shell wrappers like powershell/bash and extracts the inner command as the 'inferred' value (e.g. 'echo hello'). This caused a rawCommand vs inferred mismatch, breaking all nodes run commands with shell wrappers. The fix removes the explicit rawCommand parameter, letting the validation correctly infer the command text from the argv array. Fixes #33080 --- src/agents/tools/nodes-tool.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/agents/tools/nodes-tool.ts b/src/agents/tools/nodes-tool.ts index b90d429119b..9c335c012b4 100644 --- a/src/agents/tools/nodes-tool.ts +++ b/src/agents/tools/nodes-tool.ts @@ -18,7 +18,6 @@ import { import { parseDurationMs } from "../../cli/parse-duration.js"; import type { OpenClawConfig } from "../../config/config.js"; import { parsePreparedSystemRunPayload } from "../../infra/system-run-approval-context.js"; -import { formatExecCommand } from "../../infra/system-run-command.js"; import { imageMimeFromFormat } from "../../media/mime.js"; import type { GatewayMessageChannel } from "../../utils/message-channel.js"; import { resolveSessionAgentId } from "../agent-scope.js"; @@ -651,7 +650,6 @@ export function createNodesTool(options?: { command: "system.run.prepare", params: { command, - rawCommand: formatExecCommand(command), cwd, agentId, sessionKey,