replaceAll error when value is omitted or not boolean causes invalid_type error
🐛 Bug Report: replaceAll causes invalid_type error when omitted or not boolean
Description
When using replaceAll in an Opencode rule, an error occurs if the field is present but left undefined or not explicitly set to a boolean value (true or false).
Error output:
{
"code": "invalid_type",
"expected": "boolean",
"received": "undefined",
"path": ["replaceAll"],
"message": "Required"
}
🖥️ Environment
- Opencode Version: v0.2.33
- OS: macOS 15.5
How to fix that?
what model?
Open AI
finish fix?
Same error here
On 1.0.98 and gemini 3 pro preview I get:
Edit <file in question> [replaceAll=false]
The edit tool was called with invalid arguments: [
{
"expected": "boolean",
"code": "invalid_type",
"path": [
"replaceAll"
],
"message": "Invalid input: expected boolean, received string"
}
].
Please rewrite the input so it satisfies the expected schema.
It would proceed leaving replaceAll out and actually do something. Happends ca. 50% of the time.
Same here using Gemini 3 Pro Preview through GitHub Copilot. It eventually figures things out but it wastes a lot of time with this problem and it happens multiple times per prompt.
ill add a fix for this