Skip to content

GLM-4.7 often get stuck in thinking #8428

Closed as duplicate
Closed as duplicate

Description

@MartinVerges

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

Activity

  1. github-actions commented on Jan 14, 2026

    @github-actions
    Contributor

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

    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.

  2. MartinVerges commented on Jan 14, 2026

    @MartinVerges
    Author

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

    Image
  3. greggh commented on Jan 14, 2026

    @greggh

    We've been talking about this in this issue: #6708

    They are asking for session exports over there.

  4. MartinVerges commented on Jan 14, 2026

    @MartinVerges
    Author

    How to obtain the required information?

  5. rekram1-node commented on Jan 14, 2026

    @rekram1-node
    Collaborator

    opencode export > session.json

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

  6. SupetZYK commented on Mar 8, 2026

    @SupetZYK

    I met the same problem. GLM stops after tool_call

  7. misthema commented on Mar 30, 2026

    @misthema

    GLM has problems with whitespaces/newline char every now and then. It writes the tool call directly after some text so the parser doesn't understand it. OpenCode is not the only tool this happens with GLM-4.7.

    Example, should be:

    Now let me fix that:
    
    <tool_call>...
    

    Instead, it does this:

    Now let me fix that:<tool_call>...
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingzenRelates to Zen

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions