Bug type
Behavior bug (incorrect output/state without crash)
Summary
The edit tool's parameter validation in CLAUDE_PARAM_GROUPS does not cover common parameter name variants that LLMs generate. This causes repeated Missing required parameters errors even when the model provides correct values under slightly different parameter names.
Current accepted aliases:
- Path:
path, file_path
- Old text:
oldText, old_string
- New text:
newText, new_string
Missing aliases that LLMs commonly generate:
file (for path) — Claude models frequently use this
old_text (for oldText) — snake_case variant
new_text (for newText) — snake_case variant
Steps to reproduce
- Use any Claude model (tested with claude-opus-4-6, claude-sonnet-4-6)
- Have the model call the edit tool repeatedly across sessions
- Observe that the model sometimes generates
file instead of path, or old_text instead of oldText
- These calls fail with
Missing required parameters even though the values are correct
Expected behavior
The edit tool should accept file, old_text, and new_text as valid parameter aliases, similar to how it already accepts both camelCase (oldText) and snake_case (old_string) variants.
Actual behavior
[ERROR] [tools] edit failed: Missing required parameters: oldText (oldText or old_string), newText (newText or new_string). Supply correct parameters before retrying.
or:
[ERROR] [tools] edit failed: Missing required parameter: path (path or file_path). Supply correct parameters before retrying.
Root Cause Analysis
The validation logic in assertRequiredParams checks:
for (const group of groups) if (!group.keys.some((key) => {
if (!(key in record)) return false;
// ...
}))
When the LLM sends old_text, it doesn't match oldText or old_string, so validation fails.
Suggested Fix
Add missing aliases to CLAUDE_PARAM_GROUPS:
edit: [
- { keys: ["path", "file_path"], label: "path (path or file_path)" },
+ { keys: ["path", "file_path", "file"], label: "path (path or file_path)" },
- { keys: ["oldText", "old_string"], label: "oldText (oldText or old_string)" },
+ { keys: ["oldText", "old_string", "old_text"], label: "oldText (oldText or old_string)" },
- { keys: ["newText", "new_string"], label: "newText (newText or new_string)" },
+ { keys: ["newText", "new_string", "new_text"], label: "newText (newText or new_string)" },
]
Same aliases should be added for read and write tools' path parameter.
OpenClaw version
2026.3.2
Operating system
Windows 10
Install method
npm global
Model
anthropic/claude-opus-4-6, anthropic/claude-sonnet-4-6
Evidence
From session transcripts, the error has been recurring since March 4, 2026 across multiple sessions:
Case 1 — file alias (2026-03-21):
{"name":"edit","arguments":{"file":"C:\\Users\\PC\\Desktop\\openclaw-panel\\main.js","oldText":"...","newText":"..."}}
Result: Missing required parameter: path (path or file_path)
Case 2 — old_text/new_text alias (2026-03-22):
{"name":"edit","arguments":{"file_path":"C:\\Users\\PC\\Desktop\\openclaw-panel\\main.js","old_text":"...","new_text":"..."}}
Result: Missing required parameters: oldText (oldText or old_string), newText (newText or new_string)
Both cases had correct values — only the parameter names were slightly different from what the validator accepts.
Related Issues
Impact and severity
Frequency: Intermittent but recurring (multiple times per day across sessions)
Severity: Blocks edit operations, forces fallback to write tool (data loss risk)
Affected models: Claude Opus 4, Claude Sonnet 4 (likely affects all models)
Bug type
Behavior bug (incorrect output/state without crash)
Summary
The edit tool's parameter validation in
CLAUDE_PARAM_GROUPSdoes not cover common parameter name variants that LLMs generate. This causes repeatedMissing required parameterserrors even when the model provides correct values under slightly different parameter names.Current accepted aliases:
path,file_patholdText,old_stringnewText,new_stringMissing aliases that LLMs commonly generate:
file(for path) — Claude models frequently use thisold_text(for oldText) — snake_case variantnew_text(for newText) — snake_case variantSteps to reproduce
fileinstead ofpath, orold_textinstead ofoldTextMissing required parameterseven though the values are correctExpected behavior
The edit tool should accept
file,old_text, andnew_textas valid parameter aliases, similar to how it already accepts both camelCase (oldText) and snake_case (old_string) variants.Actual behavior
or:
Root Cause Analysis
The validation logic in
assertRequiredParamschecks:When the LLM sends
old_text, it doesn't matcholdTextorold_string, so validation fails.Suggested Fix
Add missing aliases to
CLAUDE_PARAM_GROUPS:Same aliases should be added for
readandwritetools' path parameter.OpenClaw version
2026.3.2
Operating system
Windows 10
Install method
npm global
Model
anthropic/claude-opus-4-6, anthropic/claude-sonnet-4-6
Evidence
From session transcripts, the error has been recurring since March 4, 2026 across multiple sessions:
Case 1 —
filealias (2026-03-21):{"name":"edit","arguments":{"file":"C:\\Users\\PC\\Desktop\\openclaw-panel\\main.js","oldText":"...","newText":"..."}}Result:
Missing required parameter: path (path or file_path)Case 2 —
old_text/new_textalias (2026-03-22):{"name":"edit","arguments":{"file_path":"C:\\Users\\PC\\Desktop\\openclaw-panel\\main.js","old_text":"...","new_text":"..."}}Result:
Missing required parameters: oldText (oldText or old_string), newText (newText or new_string)Both cases had correct values — only the parameter names were slightly different from what the validator accepts.
Related Issues
newTextrejected (fixed withallowEmpty: true)Impact and severity
Frequency: Intermittent but recurring (multiple times per day across sessions)
Severity: Blocks edit operations, forces fallback to write tool (data loss risk)
Affected models: Claude Opus 4, Claude Sonnet 4 (likely affects all models)