GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #13982

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[bug] GLM 5 keeps screwing up the json parsing of read tool calling#13982
Copy link
Assignees
rekram1-node

Description

@YukariMindGap
YukariMindGap
opened on Feb 17, 2026
Issue body actions

Description

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

  1. Go to a provider that offers GLM-5 (I use NanoGPT for this instance, but i think other providers might also be affected)
  2. Switch model to GLM-5 Thinking (Haven't tested in non-thinking one and i think other chinese models might have this problem)
  3. Create a test project with some files with contents inside
  4. Ask the ai to try reading those files and summarize them to you.
  5. Watch the reasoning logs and the occasional build-stopping error.

Screenshot and/or share link

Image Image

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

Activity

  1. YukariMindGap
    added
    bugSomething isn't working
    on Feb 17, 2026
  2. github-actions
    assigned
    rekram1-node
    on Feb 17, 2026
  3. github-actions commented on Feb 17, 2026

    @github-actions
    github-actionsBot
    on Feb 17, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • [BUG] GLM-5 via NVIDIA NIM emits malformed MCP tool JSON (Expected '}') in OpenCode v1.2.6 #13900: GLM-5 via NVIDIA NIM emits malformed MCP tool JSON (Expected '}') in OpenCode v1.2.6
    • 🐛 Bug Report: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7) #8102: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7)
    • [Bug] JSON Parse Error with Zhipu GLM-4.7: Stream chunks are concatenated incorrectly #7692: JSON Parse Error with Zhipu GLM-4.7: Stream chunks are concatenated incorrectly

    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.

  4. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    windows
    on Feb 17, 2026
  5. YukariMindGap commented on Feb 17, 2026

    @YukariMindGap
    YukariMindGap
    on Feb 17, 2026
    Author
    More actions

    I tried downgrading from 1.2.6 to 1.2.4 but the error still persists

  6. rekram1-node commented on Feb 17, 2026

    @rekram1-node
    rekram1-node
    on Feb 17, 2026
    Member
    More actions

    @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.

  7. YukariMindGap commented on Feb 17, 2026

    @YukariMindGap
    YukariMindGap
    on Feb 17, 2026
    Author
    More actions

    @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

  8. YukariMindGap commented on Feb 18, 2026

    @YukariMindGap
    YukariMindGap
    on Feb 18, 2026
    Author
    More actions

    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.

    Reacted by Anish Shah
  9. flyboat403 commented on Feb 19, 2026

    @flyboat403
    flyboat403
    on Feb 19, 2026
    More actions

    I also get same problem

  10. YukariMindGap commented on Feb 19, 2026

    @YukariMindGap
    YukariMindGap
    on Feb 19, 2026
    Author
    More actions

    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

    Reacted by Anish Shah
  11. YukariMindGap commented on Feb 24, 2026

    @YukariMindGap
    YukariMindGap
    on Feb 24, 2026
    Author
    More actions

    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.

    Reacted by nkosi23
  12. nkosi23 commented on Mar 10, 2026

    @nkosi23
    nkosi23
    on Mar 10, 2026
    More actions

    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

  13. thdxr
    removed
    bugSomething isn't working
    windows
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  14. github-actions commented on Jul 3, 2026

    @github-actions
    github-actionsBot
    on Jul 3, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  15. github-actions
    closed this as not plannedon Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.