GLM-4.7 often get stuck in thinking
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
Operating System
MacOS 26
Terminal
Ghostty
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.
Stopping opencode and restarting the session solves it. The last continue prompt was after the restart.
We've been talking about this in this issue: https://github.com/anomalyco/opencode/issues/6708
They are asking for session exports over there.
How to obtain the required information?
opencode export > session.json
run command in ur terminal, select session and send me the json file :)