Skip to content

Tool calls result in JSON parsing error - parameters duplicated #17315

Closed as not planned

Description

@wjw870970

Description

version 1.2.25
I use self-model (ZhipuAI/GLM-5-FP8) tool calls fail with a JSON parsing error. The parameters appear to be duplicated in the JSON payload.
Error Example:
Invalid input for tool bash: JSON parsing failed:
Text: {"command":"pwd","description":"Check current directory"{"command": "pwd", "description": "Check current directory"}.
Error message: JSON Parse error: Expected '}'
Expected JSON:
{"command":"pwd","description":"Check current directory"}
Actual JSON (what I'm seeing):
{"command":"pwd","description":"Check current directory"{"command": "pwd", "description": "Check current directory"}
Observations:

  1. The read tool worked successfully at the beginning of the conversation
  2. After several tool calls, tools like bash, edit, glob, w
Image

rite started failing
3. The JSON parameters are being duplicated/concatenated incorrectly
4. Other models (e.g., Claude, GPT) do not have this issue with the same opencode version
Environment:

  • Model: vllm-local/yhglm5
  • Platform: darwin
  • Opencode version: (latest)
    Steps to Reproduce:
  1. Start a conversation with yhglm5 model
  2. Make several tool calls (read, bash, edit, etc.)
  3. After some point, tool calls will fail with the duplicated JSON error

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 13, 2026
  2. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

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

    If your issue is distinct (e.g., parameters being specifically duplicated/concatenated rather than truncated), please add clarifying details to differentiate it from the above.

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

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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