Summary
After updating from OpenClaw 2026.2.9 to 2026.2.12, the embedded agent using Kimi K2.5 via Moonshot Direct (OpenAI-compatible API at api.moonshot.ai) consistently generates malformed tool calls. This worked correctly on 2026.2.9.
Symptoms
-
read tool called without path — The model sends an object but omits the path (and file_path) parameter entirely. Happens systematically (18+ occurrences in a single day):
[agent/embedded] read tool called without path: toolCallId=read:40 argsType=object
-
edit tool missing newText/new_string — The model calls edit without providing either accepted parameter name:
[tools] edit failed: Missing required parameter: newText (newText or new_string)
-
edit exact match failures — Downstream effect when the model eventually sends valid params but wrong content:
[tools] edit failed: Could not find the exact text in /Users/.../.openclaw/openclaw.json
Environment
- OpenClaw version: 2026.2.12 (worked on 2026.2.9)
- Model:
moonshot/kimi-k2.5 via Moonshot Direct (api.moonshot.ai, OpenAI-compatible API)
- OS: macOS (darwin 25.1.0)
- Node: 22.22.0
Analysis
The tool schemas come from @mariozechner/pi-coding-agent and are wrapped by patchToolSchemaForClaudeCompatibility() which adds aliases (file_path → path, old_string → oldText, new_string → newText). Despite these aliases, Kimi K2.5 appears to be sending parameters under names that none of the aliases cover.
The patchToolSchemaForClaudeCompatibility function name suggests these schemas are optimized for Claude. Non-Claude models using the OpenAI-compatible API may interpret the patched schemas differently, especially after the 2026.2.12 schema changes.
Reproduction
- Configure OpenClaw 2026.2.12 with
moonshot/kimi-k2.5 as primary model
- Send any message that triggers file reads or edits
- Observe
read tool called without path and edit failed: Missing required parameter in logs
Expected Behavior
Tool calls should work with OpenAI-compatible providers (Kimi K2.5 via Moonshot) as they did in 2026.2.9.
Suggested Fix
Consider one of:
- Adding broader parameter name aliasing for OpenAI-compatible models (e.g., also check
filename, file, filepath for read; replacement, text, content for edit)
- Providing a config option to use simplified/legacy tool schemas for non-Claude providers
- Testing tool schema changes against OpenAI-compatible models before release
Summary
After updating from OpenClaw 2026.2.9 to 2026.2.12, the embedded agent using Kimi K2.5 via Moonshot Direct (OpenAI-compatible API at
api.moonshot.ai) consistently generates malformed tool calls. This worked correctly on 2026.2.9.Symptoms
readtool called withoutpath— The model sends an object but omits thepath(andfile_path) parameter entirely. Happens systematically (18+ occurrences in a single day):edittool missingnewText/new_string— The model calls edit without providing either accepted parameter name:editexact match failures — Downstream effect when the model eventually sends valid params but wrong content:Environment
moonshot/kimi-k2.5via Moonshot Direct (api.moonshot.ai, OpenAI-compatible API)Analysis
The tool schemas come from
@mariozechner/pi-coding-agentand are wrapped bypatchToolSchemaForClaudeCompatibility()which adds aliases (file_path→path,old_string→oldText,new_string→newText). Despite these aliases, Kimi K2.5 appears to be sending parameters under names that none of the aliases cover.The
patchToolSchemaForClaudeCompatibilityfunction name suggests these schemas are optimized for Claude. Non-Claude models using the OpenAI-compatible API may interpret the patched schemas differently, especially after the 2026.2.12 schema changes.Reproduction
moonshot/kimi-k2.5as primary modelread tool called without pathandedit failed: Missing required parameterin logsExpected Behavior
Tool calls should work with OpenAI-compatible providers (Kimi K2.5 via Moonshot) as they did in 2026.2.9.
Suggested Fix
Consider one of:
filename,file,filepathfor read;replacement,text,contentfor edit)