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
All three issues report the same root cause: incomplete/truncated JSON being generated for the write tool with missing closing braces, resulting in 'JSON Parse error: Expected '}'.
Feel free to ignore if this is a new variation of the issue or if you have more specific details to add.
This happens for me occasionally with opus 4.5 as well. A few variables in my current session that could be factors:
A lot of subagent calls
48% context used
Trying to write 500 lines
once the tool fails, it doesnt seem to be able to recover, even if I describe the missing bracket, or reboot opencode and rejoin the session and ask again
I believe this is a size issue. I didn't have it for weeks and suddenly got it today. I asked to proceed in chunks and it worked.
It's not just the size of the output, I had worked with bigger files, there must be something else at play.
What is strange is that it only does it with Opus on GH Copilot, not with Opus on Bedrock (which goes by token).
Might it be some size limitation on the GH Copilot part?
This happened to me the last couple of days also (GHCP license with Opus 4.5) when opencode was trying to create a design doc of about 110K+ in size. It also failed when I asked it to write out in chunks. However, after exiting from opencode and then resuming (opencode --c), writing out in chunks worked.
This also happened randomly when opencode was working on an implementation task and failed to create a file (same exact error message). The failure caused opencode to stop working. However, prompting it to resume usually works.
Getting same issue. Error persists among different models. When outoput is too long model is not able to get correct json format.
A workarond is to direct agent to write to file in chunks.
Also getting this error. It is frustrating, too, because it falls into a loop trying different solutions and burning tokens the entire time, unfairly spending my money. In my case, it complains of a missing closing brace as well.
Activity
github-actions commentedon Dec 21, 2025
This issue might be a duplicate of existing issues. Please check:
All three issues report the same root cause: incomplete/truncated JSON being generated for the write tool with missing closing braces, resulting in 'JSON Parse error: Expected '}'.
Feel free to ignore if this is a new variation of the issue or if you have more specific details to add.
julioocamargoo commentedon Jan 8, 2026
Same hapenning here. It often happens when I'm using superpowers:writing-plans, but solves when I say to break file on smaller ones.
madisonbullard commentedon Jan 9, 2026
This happens for me occasionally with opus 4.5 as well. A few variables in my current session that could be factors:
once the tool fails, it doesnt seem to be able to recover, even if I describe the missing bracket, or reboot opencode and rejoin the session and ask again
rdentato commentedon Jan 12, 2026
I believe this is a size issue. I didn't have it for weeks and suddenly got it today. I asked to proceed in chunks and it worked.
It's not just the size of the output, I had worked with bigger files, there must be something else at play.
What is strange is that it only does it with Opus on GH Copilot, not with Opus on Bedrock (which goes by token).
Might it be some size limitation on the GH Copilot part?
julioocamargoo commentedon Jan 12, 2026
Probably Opus write bigger files. I'm my case it happens using GH copilot Sonnet
thuduc commentedon Jan 27, 2026
This happened to me the last couple of days also (GHCP license with Opus 4.5) when opencode was trying to create a design doc of about 110K+ in size. It also failed when I asked it to write out in chunks. However, after exiting from opencode and then resuming (opencode --c), writing out in chunks worked.
This also happened randomly when opencode was working on an implementation task and failed to create a file (same exact error message). The failure caused opencode to stop working. However, prompting it to resume usually works.
Starlight0798 commentedon Jan 31, 2026
the same problem, when I switch model to GLM4.7, this disappears. So I think it maybe because of the written text is too long, and failed.
Snow-Crash commentedon Mar 5, 2026
Getting same issue. Error persists among different models. When outoput is too long model is not able to get correct json format.
A workarond is to direct agent to write to file in chunks.
pchasco commentedon Mar 22, 2026
Also getting this error. It is frustrating, too, because it falls into a loop trying different solutions and burning tokens the entire time, unfairly spending my money. In my case, it complains of a missing closing brace as well.
github-actions commentedon Jul 3, 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.