JSON parsing failed: Text
Write
The arguments provided to the tool are invalid: Invalid input for tool write: JSON parsing failed: Text:
{"filePath": "/Volumes/4t/Deep Multi-Task and Meta Learning/01/main.py".
Error message: JSON Parse error: Expected '}'
This issue might be a duplicate of existing issues. Please check:
- #2002: Similar JSON parse error 'Expected '}' with the write tool after updating to v0.5.5
- #1803: Similar JSON parsing error with AWS Bedrock - 'The arguments provided to the tool are invalid: Invalid input for tool write: JSON parsing failed'
- #1278: Similar 'JSON Parse error: Unterminated string' issue with openrouter/kimi-k2
Feel free to ignore if none of these address your specific case.
this is the llm failing to call the tool looks like, this can happen from time to time, some models are worse than others.
What model was it?
duplicated, sorry github claude 4 model
this is the llm failing to call the tool looks like, this can happen from time to time, some models are worse than others.
What model was it?
Write
The arguments provided to the tool are invalid: Invalid input for tool write: Type validation failed: Value:
{}.
Error message: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"filePath"
],
"message": "Required"
Write
The arguments provided to the tool are invalid: Invalid input for tool write: JSON parsing failed: Text:
{"filePath": "xxxx.txt".
Error message: JSON Parse error: Expected '}'
I’m experiencing a similar issue. It seems that this model, specifically the GitHub Claude 4 one, has recurring problems.
I’m experiencing a similar issue. It seems that this model, specifically the GitHub Claude 4 one, has recurring problems.
I am using the same model.
Same error here, using opencode 0.14.6 and LM Studio 0.3.29 with qwen/qwen3-coder-30b. If I use qwen/qwen2.5-coder-14b the error is not present.
yeah looks like lm studio issue : https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/1071
Fixed in LM Studio 0.3.30, sorry about that
It's ok, just a comment in case anyone needed more information about versions,etc... Thank you
Happening with copilot and opus 4.5
I am also started having this issue last week from nowhere. Also using GitHub Copilot models. In my case Sonnet 4.5
@brpaz can u share session?
Note that normally this is the model/provider emitting incomplete tool calls
opencode export > session.json
Sorry. I think I don´t have that session anymore.
In the meantime, I found some Github Issue that mentioned that this happens when the contents of the file are too big. asking the model to write to the file in chunks seems to have fixed the issue.
If this happens agian I will save the session and share here.