openclaw - ✅(Solved) Fix [Bug]: Title: [Bug] Exec tool fails validation despite correct config — "command: must have required property 'command'" [2 pull requests, 2 comments, 1 participants]

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…
GitHub stats
openclaw/openclaw#56916Fetched 2026-04-08 01:46:01
View on GitHub
Comments
2
Participants
1
Timeline
11
Reactions
0
Participants
Timeline (top)
commented ×2cross-referenced ×2labeled ×2closed ×1

Description: After updating to 2026.3.28 (f9b1079), agents cannot execute any commands. The exec tool fails validation with:

Validation failed for tool "exec": command: must have required property 'command' Received arguments: {}Environment:

• OpenClaw version: 2026.3.28 (f9b1079) • OS: macOS 15.3.2 (Darwin 25.3.0 arm64) • Install method: npm global • Model: kimi-coding/k2p5

Config (tools section):

"tools": { "profile": "full", "allow": ["*"], "exec": { "host": "gateway", "security": "full", "ask": "off" } }Tried:

• ✅ Latest version 2026.3.28 • ✅ Downgrade to 2026.2.21 • ✅ Config fix (exec settings with ask: "off") • ✅ Multiple gateway restarts • ✅ All "workarounds" from #39691

Result: Still broken. The agent generates commands but they never execute.

Impact: Completely blocks autonomous agent functionality.

Error Message

Tool validation error (consistent):

Validation failed for tool "exec":

  • command: must have required property 'command' Received arguments: {}Config verification:

$ cat ~/.openclaw/openclaw.json | grep -A5 '"tools"' "tools": { "profile": "full", "allow": ["*"], "exec": { "host": "gateway", "security": "full", "ask": "off" } }Failed downgrade attempt:

npm error code EACCES npm error syscall rename npm error path /opt/homebrew/lib/node_modules/openclaw ... npm error The operation was rejected by your operating system.Session crash during restart:

node:events:497 throw er; // Unhandled 'error' event ^ Error: write EPIPENo gateway logs — validation fails before command reaches gateway.

Root Cause

Description: After updating to 2026.3.28 (f9b1079), agents cannot execute any commands. The exec tool fails validation with:

Validation failed for tool "exec": command: must have required property 'command' Received arguments: {}Environment:

• OpenClaw version: 2026.3.28 (f9b1079) • OS: macOS 15.3.2 (Darwin 25.3.0 arm64) • Install method: npm global • Model: kimi-coding/k2p5

Config (tools section):

"tools": { "profile": "full", "allow": ["*"], "exec": { "host": "gateway", "security": "full", "ask": "off" } }Tried:

• ✅ Latest version 2026.3.28 • ✅ Downgrade to 2026.2.21 • ✅ Config fix (exec settings with ask: "off") • ✅ Multiple gateway restarts • ✅ All "workarounds" from #39691

Result: Still broken. The agent generates commands but they never execute.

Impact: Completely blocks autonomous agent functionality.

Fix Action

Fix / Workaround

• ✅ Latest version 2026.3.28 • ✅ Downgrade to 2026.2.21 • ✅ Config fix (exec settings with ask: "off") • ✅ Multiple gateway restarts • ✅ All "workarounds" from #39691

• Consistency: Bug occurs 100% of the time — every exec call fails • Error details: Validation shows Received arguments: {} — the command parameter is not being passed through • Gateway logs: No exec attempt appears in gateway logs — validation fails before reaching gateway • Related issues: Persists despite fixes from #39691 — config has tools.profile: "full" and tools.exec.ask: "off" but still fails • Other tools affected: write tool also intermittently fails with content: must have required property 'content' • Session stability: Attempting to downgrade OpenClaw version caused session crashes • Workaround: User must manually run commands that agent generates

PR fix notes

PR #56944: fix: restore exec tool command argument validation (fixes #56916)

Description (problem / solution / changelog)

Summary

Fixes the exec tool validation failure where command property was missing despite the model sending correct arguments.

Root Cause

The bug affected Kimi (Anthropic-compatible API) provider users in 2026.3.28. The Kimi tool-call argument repair path incorrectly cleared valid streamed arguments back to {} when the final } delta triggered a repair check on already-complete JSON. This was already fixed by commits a2e4707cf and ec7f19e2e. This PR adds a changelog entry documenting the fix for issue #56916.

Fixes openclaw/openclaw#56916

Changed files

  • CHANGELOG.md (modified, +1/-0)

PR #59440: fix: normalize Kimi anthropic tool payloads

Description (problem / solution / changelog)

Summary

  • mark Kimi and Kimi Coding as OpenAI-function-style Anthropic tool payload providers
  • align the bundled plugin capability metadata with the fallback capability registry
  • add regression coverage for Kimi payload normalization on the Anthropic Messages path

Fixes #59327 Fixes #54442 Fixes #58817 Fixes #53747 Fixes #56916

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/kimi-coding/index.ts (modified, +2/-0)
  • src/agents/pi-embedded-runner-extraparams.test.ts (modified, +71/-8)
  • src/agents/provider-capabilities.test.ts (modified, +13/-6)
  • src/agents/provider-capabilities.ts (modified, +2/-0)

Code Example

Tool validation error (consistent):

Validation failed for tool "exec":
  - command: must have required property 'command'
Received arguments:
{}Config verification:

$ cat ~/.openclaw/openclaw.json | grep -A5 '"tools"'
 "tools": {
   "profile": "full",
   "allow": ["*"],
   "exec": {
     "host": "gateway",
     "security": "full",
     "ask": "off"
   }
 }Failed downgrade attempt:

npm error code EACCES
npm error syscall rename
npm error path /opt/homebrew/lib/node_modules/openclaw
...
npm error The operation was rejected by your operating system.Session crash during restart:

node:events:497
 throw er; // Unhandled 'error' event
 ^
Error: write EPIPENo gateway logs — validation fails before command reaches gateway.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

Yes

Summary

Description: After updating to 2026.3.28 (f9b1079), agents cannot execute any commands. The exec tool fails validation with:

Validation failed for tool "exec": command: must have required property 'command' Received arguments: {}Environment:

• OpenClaw version: 2026.3.28 (f9b1079) • OS: macOS 15.3.2 (Darwin 25.3.0 arm64) • Install method: npm global • Model: kimi-coding/k2p5

Config (tools section):

"tools": { "profile": "full", "allow": ["*"], "exec": { "host": "gateway", "security": "full", "ask": "off" } }Tried:

• ✅ Latest version 2026.3.28 • ✅ Downgrade to 2026.2.21 • ✅ Config fix (exec settings with ask: "off") • ✅ Multiple gateway restarts • ✅ All "workarounds" from #39691

Result: Still broken. The agent generates commands but they never execute.

Impact: Completely blocks autonomous agent functionality.

Steps to reproduce

  1. Install/update OpenClaw: npm install -g [email protected]. Verify config has exec enabled: openclaw config get tools.profile # returns "full" openclaw config get tools.exec # returns {"host":"gateway","security":"full","ask":"off"}3. Start/restart gateway: openclaw gateway restart4. Ask agent to run any command: • "List files in current directory" • "Check what version of node is installed" • "Run: echo 'hello'"
  2. Observe failure: • Agent generates the command • Validation error: command: must have required property 'command' • Command never executes • Agent falls back to asking user to run it manually

Expected: Command executes automatically Actual: Validation fails, command displayed but not run

Expected behavior

When an agent requests to execute a command via the exec tool, the gateway should:

  1. Accept the command parameters
  2. Execute the command on the host system
  3. Return the output to the agent

Example of working flow (pre-2026.3.7):

User: "List files in current directory"

Agent: [calls exec with command="ls -la"]

System: [executes ls -la]

Agent: "Here are the files: [output]"Actual behavior (broken):

User: "List files in current directory"

Agent: [calls exec with command="ls -la"]

System: Validation failed for tool "exec": command: must have required property 'command' Received arguments: {}

Agent: "I can't run commands directly. Please run: ls -la"The agent should be able to execute commands autonomously when tools.profile is set to "full" or "coding" and tools.exec.ask is "off".

Actual behavior

When an agent requests to execute a command via the exec tool, the gateway should:

  1. Accept the command parameters
  2. Execute the command on the host system
  3. Return the output to the agent

Example of working flow (pre-2026.3.7):

User: "List files in current directory"

Agent: [calls exec with command="ls -la"]

System: [executes ls -la]

Agent: "Here are the files: [output]"Actual behavior (broken):

User: "List files in current directory"

Agent: [calls exec with command="ls -la"]

System: Validation failed for tool "exec": command: must have required property 'command' Received arguments: {}

Agent: "I can't run commands directly. Please run: ls -la"The agent should be able to execute commands autonomously when tools.profile is set to "full" or "coding" and tools.exec.ask is "off".

OpenClaw version

When an agent requests to execute a command via the exec tool, the gateway should: 1. Accept the command parameters 2. Execute the command on the host system 3. Return the output to the agent Example of working flow (pre-2026.3.7): User: "List files in current directory" Agent: [calls exec with command="ls -la"] System: [executes ls -la] Agent: "Here are the files: [output]"Actual behavior (broken): User: "List files in current directory" Agent: [calls exec with command="ls -la"] System: Validation failed for tool "exec": command: must have required property 'command' Received arguments: {} Agent: "I can't run commands directly. Please run: ls -la"The agent should be able to execute commands autonomously when tools.profile is set to "full" or "coding" and tools.exec.ask is "off".

Operating system

Operating system: macOS Sequoia 15.3.2 (Darwin 25.3.0, arm64 — Apple Silicon) Node version: v22.22.1 Shell: zsh

Install method

Install method: npm global npm install -g [email protected]

Model

Model: kimi-coding/k2p5 (primary) Also tested with fallback: • ollama/llama3.2 (configured but not reached due to exec failure) Model configuration: "models": { "providers": { "kimi-coding": { "baseUrl": "https://api.kimi.com/coding/", "api": "anthropic-messages" } } }

Provider / routing chain

Provider: Kimi Coding (kimi-coding) Provider ID: kimi-coding/k2p5 Base URL: https://api.kimi.com/coding/

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Tool validation error (consistent):

Validation failed for tool "exec":
  - command: must have required property 'command'
Received arguments:
{}Config verification:

$ cat ~/.openclaw/openclaw.json | grep -A5 '"tools"'
 "tools": {
   "profile": "full",
   "allow": ["*"],
   "exec": {
     "host": "gateway",
     "security": "full",
     "ask": "off"
   }
 }Failed downgrade attempt:

npm error code EACCES
npm error syscall rename
npm error path /opt/homebrew/lib/node_modules/openclaw
...
npm error The operation was rejected by your operating system.Session crash during restart:

node:events:497
 throw er; // Unhandled 'error' event
 ^
Error: write EPIPENo gateway logs — validation fails before command reaches gateway.

Impact and severity

Impact: Critical — Core functionality completely broken

• 100% of exec tool calls fail • Agents cannot execute any commands autonomously • All file operations, system commands, package installs blocked • User must manually run every command agent generates • Defeats purpose of autonomous agent

Security considerations:

• Bug forces manual command execution (safer, but inconvenient) • No security vulnerability — just broken functionality • No privilege escalation risk • No data exposure risk

Severity: P0/Critical — Blocks all autonomous operations

Additional information

• Consistency: Bug occurs 100% of the time — every exec call fails • Error details: Validation shows Received arguments: {} — the command parameter is not being passed through • Gateway logs: No exec attempt appears in gateway logs — validation fails before reaching gateway • Related issues: Persists despite fixes from #39691 — config has tools.profile: "full" and tools.exec.ask: "off" but still fails • Other tools affected: write tool also intermittently fails with content: must have required property 'content' • Session stability: Attempting to downgrade OpenClaw version caused session crashes • Workaround: User must manually run commands that agent generates

Suspected cause: Tool parameter validation layer is not receiving arguments from model, or model is not sending parameters in expected format.

extent analysis

Fix Plan

To resolve the issue, we need to ensure that the command parameter is being passed correctly to the exec tool.

  • Update the exec tool to accept commands in the new format.
  • Modify the model to send the command parameter in the expected format.

Here's an example of how the exec tool can be updated:

// exec-tool.js
const executeCommand = async (args) => {
  const { command } = args;
  // Validate the command parameter
  if (!command) {
    throw new Error('command: must have required property \'command\'');
  }
  // Execute the command
  const result = await executeSystemCommand(command);
  return result;
};

const executeSystemCommand = async (command) => {
  // Implement the system command execution logic here
  // For example:
  const { exec } = require('child_process');
  return new Promise((resolve, reject) => {
    exec(command, (error, stdout, stderr) => {
      if (error) {
        reject(error);
      } else {
        resolve(stdout);
      }
    });
  });
};

module.exports = executeCommand;

In the model, ensure that the command parameter is being sent in the expected format:

// model.js
const generateCommand = (input) => {
  const command = `ls -la`; // Generate the command based on the input
  return { command };
};

module.exports = generateCommand;

Verification

To verify that the fix worked, follow these steps:

  1. Update the exec tool and the model with the changes mentioned above.
  2. Restart the gateway and the agent.
  3. Test the exec tool by running a command, such as "List files in current directory".
  4. Verify that the command is executed successfully and the output is returned to the agent.

Extra Tips

  • Ensure that the exec tool is properly configured and enabled in the openclaw.json file.
  • If you're using a custom model, make sure it's compatible with the updated exec tool.
  • If you encounter any issues during the update process, refer to the OpenClaw documentation and the related issues mentioned in the problem description.

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

When an agent requests to execute a command via the exec tool, the gateway should:

  1. Accept the command parameters
  2. Execute the command on the host system
  3. Return the output to the agent

Example of working flow (pre-2026.3.7):

User: "List files in current directory"

Agent: [calls exec with command="ls -la"]

System: [executes ls -la]

Agent: "Here are the files: [output]"Actual behavior (broken):

User: "List files in current directory"

Agent: [calls exec with command="ls -la"]

System: Validation failed for tool "exec": command: must have required property 'command' Received arguments: {}

Agent: "I can't run commands directly. Please run: ls -la"The agent should be able to execute commands autonomously when tools.profile is set to "full" or "coding" and tools.exec.ask is "off".

Still need to ship something?

×6

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

Back to top recommendations

TRENDING