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
{{ message }}
Repository navigation
[bug] GLM 5 keeps screwing up the json parsing of read tool calling #13982
I've been using GLM 5 from NanoGPT for a while, running opencode cli inside VS Code. But lately there's an increase of tendency for the ai to get stuck in a loop due to tool calling errors, mostly on the "read" tool. I have no idea what's happening but apparently the ai keeps screwing up the JSON formatting for the tool calling. Sometimes i even get "Method Not Allowed" errors that stops the build dead in the tracks. I thought it's the Superpowers plugin i've installed but i've made a clean reinstall and the errors persist.
I've attached some error logs while testing on a test project.
Plugins
None. it's a fresh install
OpenCode version
1.2.6
Steps to reproduce
Go to a provider that offers GLM-5 (I use NanoGPT for this instance, but i think other providers might also be affected)
Switch model to GLM-5 Thinking (Haven't tested in non-thinking one and i think other chinese models might have this problem)
Create a test project with some files with contents inside
Ask the ai to try reading those files and summarize them to you.
Watch the reasoning logs and the occasional build-stopping error.
These issues describe very similar symptoms with GLM models producing malformed JSON during tool calls. The #13900 issue is particularly similar as it also reports GLM-5 with malformed JSON errors in v1.2.6.
I also get this problem from Qwen 3.5 and Kimi 2.5, so i think that might be an issue of the models themselves. Haven't tried on GPT 5.2, Claude 4.5 Opus/ 4.6 Sonnet, or Gemini 3 Pro.
I also get this problem from Qwen 3.5 and Kimi 2.5, so i think that might be an issue of the models themselves. Haven't tried on GPT 5.2, Claude 4.5 Opus/ 4.6 Sonnet, or Gemini 3 Pro.
Minimax 2.5, oddly enough, doesn't have this problem. I was testing Qwen 3.5 and Kimi 2.5 with the thinking model, so that might be a problem
I think the malformed json has been mostly fixed by itself, but now i got this problem where tool calling keeps coming up with "missing". I've found no reason why this happened.
I think the malformed json has been mostly fixed by itself, but now i got this problem where tool calling keeps coming up with "missing". I've found no reason why this happened.
Activity
github-actions commentedon Feb 17, 2026
This issue might be a duplicate of existing issues. Please check:
These issues describe very similar symptoms with GLM models producing malformed JSON during tool calls. The #13900 issue is particularly similar as it also reports GLM-5 with malformed JSON errors in v1.2.6.
YukariMindGap commentedon Feb 17, 2026
I tried downgrading from 1.2.6 to 1.2.4 but the error still persists
rekram1-node commentedon Feb 17, 2026
@YukariMindGap can u send me the session?
opencode export > session.jsonRUN this exact command in your terminal, select the session and send me the json file from the output.
YukariMindGap commentedon Feb 17, 2026
session.json
here it is
@rekram1-node
YukariMindGap commentedon Feb 18, 2026
I also get this problem from Qwen 3.5 and Kimi 2.5, so i think that might be an issue of the models themselves. Haven't tried on GPT 5.2, Claude 4.5 Opus/ 4.6 Sonnet, or Gemini 3 Pro.
flyboat403 commentedon Feb 19, 2026
I also get same problem
YukariMindGap commentedon Feb 19, 2026
Minimax 2.5, oddly enough, doesn't have this problem. I was testing Qwen 3.5 and Kimi 2.5 with the thinking model, so that might be a problem
YukariMindGap commentedon Feb 24, 2026
I think the malformed json has been mostly fixed by itself, but now i got this problem where tool calling keeps coming up with "missing". I've found no reason why this happened.
nkosi23 commentedon Mar 10, 2026
Have the same issue
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.