Bug type
Regression (worked before, now fails)
Summary
name: Bug report
about: LLM tool call validation errors when parameters are missing
title: '[Bug] Tool calls fail with validation errors when required parameters are omitted'
labels: bug, tool-calling, validation
assignees: ''
Bug Description
When LLM fails to construct complete parameters during a tool call chain, it repeatedly calls the same tool (passing empty object {} or missing required parameters), resulting in repetitive validation errors. This is not an issue with individual tools, but a flaw in the tool calling mechanism's retry behavior when parameter construction fails.
Environment
| Item |
Version/Info |
| OpenClaw Version |
Latest (2026-03-24) |
| Host |
chen's Mac mini |
| OS |
Darwin 25.2.0 (arm64) |
| Node.js |
v24.14.0 |
| Model |
kimi/kimi-code |
| Default Model |
kimi/kimi-code |
| Shell |
zsh |
| Channel |
webchat |
Steps to Reproduce
- Trigger a task requiring multi-step tool calls
- During parameter construction, if LLM fails to properly populate required parameters
- Observe the tool being called multiple times (with empty object
{})
- Each call returns the same validation error
Actual Behavior
Error Type 1: read tool missing path parameter
Missing required parameter: path alias. Supply correct parameters before retrying.
- Occurrences: 7 times
- Trigger scenario: Calling
read with only empty object {}, without providing file_path or path
Error Type 2: exec tool missing command parameter
Validation failed for tool "exec": command: must have required property 'command'
- Occurrences: 10+ times
- Trigger scenario: Calling
exec with only empty object {}, without providing command
Error Type 3: feishu_drive_file tool missing action parameter
Validation failed for tool "feishu_drive_file": action: must have required property 'action'
- Occurrences: 3 times
- Trigger scenario: Calling
feishu_drive_file with only empty object {}, without providing action
Expected Behavior
- Pre-validation: System should validate all required parameters are populated before sending tool calls
- Single failure: If parameter construction fails, should error only once instead of repeatedly calling the same tool
- Friendly hints: Error messages should guide LLM on how to correctly fill missing parameters
- Graceful degradation: If parameters cannot be constructed, should stop current tool chain instead of retrying
Root Cause Analysis
The core issues are:
- Fallback behavior on parameter construction failure: When LLM cannot correctly construct complex parameters, it may fallback to passing empty object
{}
- Lack of pre-validation: System does not validate parameter completeness before sending
- Over-aggressive retry mechanism: After encountering validation errors, LLM attempts to call again but still uses the same empty parameters
Suggested Fix
Option 1: Client-side Pre-validation (Recommended)
Before sending tool call requests, system layer validates all required parameters exist:
- If missing, immediately return structured error to LLM instead of sending to tool layer
- This avoids invalid remote calls
Option 2: Error Feedback Optimization
When detecting empty parameters or missing required parameters:
- Return more detailed errors containing parameter schema information
- Prompt LLM which fields need to be filled
Option 3: Retry Limiting
For validation errors (e.g., missing required parameter):
- Limit retry count to 1
- Or require LLM to modify parameters before continuing
Additional Context
Complete Error Log Timeline
[15:16:35] read: Missing required parameter: path alias (×7)
[15:16:42] exec: Missing required property 'command' (×10+)
[15:16:48] feishu_drive_file: Missing required property 'action' (×3)
Original User Request
"Send the README.md file to my Feishu cloud drive"
This was a simple request, but triggered multiple tool call errors during execution.
Checklist
Steps to reproduce
- Trigger a task requiring multi-step tool calls
- During parameter construction, if LLM fails to properly populate required parameters
- Observe the tool being called multiple times (with empty object
{})
- Each call returns the same validation error
Expected behavior
- Pre-validation: System should validate all required parameters are populated before sending tool calls
- Single failure: If parameter construction fails, should error only once instead of repeatedly calling the same tool
- Friendly hints: Error messages should guide LLM on how to correctly fill missing parameters
- Graceful degradation: If parameters cannot be constructed, should stop current tool chain instead of retrying
Actual behavior
Error Type 1: read tool missing path parameter
Missing required parameter: path alias. Supply correct parameters before retrying.
- Occurrences: 7 times
- Trigger scenario: Calling
read with only empty object {}, without providing file_path or path
Error Type 2: exec tool missing command parameter
Validation failed for tool "exec": command: must have required property 'command'
- Occurrences: 10+ times
- Trigger scenario: Calling
exec with only empty object {}, without providing command
Error Type 3: feishu_drive_file tool missing action parameter
Validation failed for tool "feishu_drive_file": action: must have required property 'action'
- Occurrences: 3 times
- Trigger scenario: Calling
feishu_drive_file with only empty object {}, without providing action
OpenClaw version
2026-03-24
Operating system
macOS Darwin 25.2.0
Install method
npm
Model
kimi/kimi-code
Provider / routing chain
openclaw-> kimi/kimi-code
Additional provider/model setup details
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Bug type
Regression (worked before, now fails)
Summary
name: Bug report
about: LLM tool call validation errors when parameters are missing
title: '[Bug] Tool calls fail with validation errors when required parameters are omitted'
labels: bug, tool-calling, validation
assignees: ''
Bug Description
When LLM fails to construct complete parameters during a tool call chain, it repeatedly calls the same tool (passing empty object
{}or missing required parameters), resulting in repetitive validation errors. This is not an issue with individual tools, but a flaw in the tool calling mechanism's retry behavior when parameter construction fails.Environment
Steps to Reproduce
{})Actual Behavior
Error Type 1:
readtool missing path parameterreadwith only empty object{}, without providingfile_pathorpathError Type 2:
exectool missing command parameterexecwith only empty object{}, without providingcommandError Type 3:
feishu_drive_filetool missing action parameterfeishu_drive_filewith only empty object{}, without providingactionExpected Behavior
Root Cause Analysis
The core issues are:
{}Suggested Fix
Option 1: Client-side Pre-validation (Recommended)
Before sending tool call requests, system layer validates all
requiredparameters exist:Option 2: Error Feedback Optimization
When detecting empty parameters or missing required parameters:
Option 3: Retry Limiting
For validation errors (e.g., missing required parameter):
Additional Context
Complete Error Log Timeline
Original User Request
This was a simple request, but triggered multiple tool call errors during execution.
Checklist
Steps to reproduce
{})Expected behavior
Actual behavior
Error Type 1:
readtool missing path parameterreadwith only empty object{}, without providingfile_pathorpathError Type 2:
exectool missing command parameterexecwith only empty object{}, without providingcommandError Type 3:
feishu_drive_filetool missing action parameterfeishu_drive_filewith only empty object{}, without providingactionOpenClaw version
2026-03-24
Operating system
macOS Darwin 25.2.0
Install method
npm
Model
kimi/kimi-code
Provider / routing chain
openclaw-> kimi/kimi-code
Additional provider/model setup details
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response