GeezerVison is showing github.com — [bug] GLM 5 keeps screwing up the json parsing of read tool calling · Issue #13982 · anomalyco/opencode
[bug] GLM 5 keeps screwing up the json parsing of read tool calling #13982DescriptionDescription
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.
Screenshot and/or share link
Operating System
Windows 11
Terminal
Windows Terminal in VS Code Reacted by Hadrien, Saputro Aryulianto, Omar M., Phil R, Daniel Goliszewski and sure Reacted by sure Activitygithub-actions commented on 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. added coreAnything pertaining to core functionality of the application (opencode server stuff) on Feb 17, 2026YukariMindGap commented on Feb 17, 2026 I tried downgrading from 1.2.6 to 1.2.4 but the error still persists rekram1-node commented on Feb 17, 2026 @YukariMindGap can u send me the session?
opencode export > session.json
RUN this exact command in your terminal, select the session and send me the json file from the output. YukariMindGap commented on Feb 17, 2026
@YukariMindGap can u send me the session?
opencode export > session.json
RUN this exact command in your terminal, select the session and send me the json file from the output.
session.json
here it is
@rekram1-node YukariMindGap commented on 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 commented on Feb 19, 2026 YukariMindGap commented on Feb 19, 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.
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 commented on 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 commented on Mar 10, 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.
Have the same issue removed bugSomething isn't working coreAnything pertaining to core functionality of the application (opencode server stuff) on May 3, 2026github-actions commented on 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.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|