You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
similar issue
The write tool was called with invalid arguments: SchemaError(Missing key
at ["content"]).
Please rewrite the input so it satisfies the expected schema.
~ Preparing write...
The write tool was called with invalid arguments: SchemaError(Missing key
at ["filePath"]).
Please rewrite the input so it satisfies the expected schema.
I am using Opencode, Ollama, VSCode and Qwen 3.5.
Reacted by Benoit , NilFusion and Valencio Hoffman
From my analysis, Model hallucinate and failed to send tools argument. When I enquired about missing of tools call without argument, it believe, the argument was sent in the tool call response. But the argument was missing. I tried to handle this via system prompt, didn't help.
Opened a PR that should help with this — #30224. When the model sends wrong argument keys (e.g. fileContent instead of content), the error fed back now tells it which keys it should have used vs what it sent, so it can self-correct on the next turn instead of hitting the retry limit.
Activity
github-actions commentedon Mar 18, 2026
This issue might be a duplicate of existing issues. Please check:
AI_InvalidToolInputErrorwithinvalid_typeoncontentandfilePathfields when the write tool receives undefined valuesPlease review those issues to see if your problem is already tracked there.
spotlesscoder commentedon Mar 18, 2026
Could be related to #11112 but I'm not sure
darluc commentedon Mar 19, 2026
Same problem. Version: 1.2.27
haoxuanpan commentedon Apr 22, 2026
Same, Claude 4.6 and Mac
nirolfa commentedon Apr 27, 2026
similar issue
The write tool was called with invalid arguments: SchemaError(Missing key
at ["content"]).
Please rewrite the input so it satisfies the expected schema.
opencode 1.14.28
cliu639 commentedon May 4, 2026
The skill tool was called with invalid arguments: SchemaError(Missing key
at ["name"]).
Please rewrite the input so it satisfies the expected schema.
Similar issue here
f-g-s commentedon May 4, 2026
I am using Opencode, Ollama, VSCode and Qwen 3.5.
striver8 commentedon May 18, 2026
不用zen或go里模型,这个不能写入问题一直存在,没法解决,永远在循环报错
rudy500 commentedon May 22, 2026
Hi Everyone! I am using opencode 1.15.7, lmstudio and Qwen 3.6 27B and same error.
Rajeshwaran-R commentedon May 26, 2026
Hi Everyone, Facing the same
Opencode: 1.15.10
Model: QWEN 3.5 122B A10B
From my analysis, Model hallucinate and failed to send tools argument. When I enquired about missing of tools call without argument, it believe, the argument was sent in the tool call response. But the argument was missing. I tried to handle this via system prompt, didn't help.
seeking for a help. Thanks.
nikhilkulkarni1755 commentedon Jun 1, 2026
Opened a PR that should help with this — #30224. When the model sends wrong argument keys (e.g.
fileContentinstead ofcontent), the error fed back now tells it which keys it should have used vs what it sent, so it can self-correct on the next turn instead of hitting the retry limit.github-actions commentedon Aug 1, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
AlieNiT commentedon Oct 11, 2026
I'm still experiencing the same issue.