opencode icon indicating copy to clipboard operation
opencode copied to clipboard

GLM-4.7 often get stuck in thinking

Open MartinVerges opened this issue 2 weeks ago • 2 comments

Description

Trying out the GLM-4.7 Z.AI Coding Plan, leads often to stopped conversations. It looks like some form of communication problem as the ´<tool_call>..´ block is likely not meant to be displayed this way.

Plugins

No response

OpenCode version

1.1.19

Steps to reproduce

Sadly hard to reproduce. Comes from time to time with that model.

Screenshot and/or share link

Image

Operating System

MacOS 26

Terminal

Ghostty

MartinVerges avatar Jan 14 '26 11:01 MartinVerges

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

  • #7779: GLM 4.7 thinking process not properly formatted - missing leading tags
  • #6708: GLM 4.7 on Zai coding plan puts tool calls inside the thinking/reasoning tag
  • #7692: JSON Parse Error with Zhipu GLM-4.7: Stream chunks are concatenated incorrectly
  • #8102: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7)

These issues appear to describe similar communication/parsing problems with the GLM-4.7 model, particularly related to tool calls and thinking blocks. Feel free to ignore if this addresses a different specific case.

github-actions[bot] avatar Jan 14 '26 11:01 github-actions[bot]

Stopping opencode and restarting the session solves it. The last continue prompt was after the restart.

Image

MartinVerges avatar Jan 14 '26 11:01 MartinVerges

We've been talking about this in this issue: https://github.com/anomalyco/opencode/issues/6708

They are asking for session exports over there.

greggh avatar Jan 14 '26 17:01 greggh

How to obtain the required information?

MartinVerges avatar Jan 14 '26 18:01 MartinVerges

opencode export > session.json

run command in ur terminal, select session and send me the json file :)

rekram1-node avatar Jan 14 '26 18:01 rekram1-node