Skip to content

Tool calls abort, fail, syntax error #4042

Closed

Description

@stellar-ssj

Description

Unfortunately build mode is like useless for me now :/ all that happens:

SyntaxError: Unexpected end of JSON input

OpenCode version

1.0.39

Steps to reproduce

No response

Screenshot and/or share link

Image
Image

Operating System

windows 10

Terminal

wezTerm

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 7, 2025
  2. github-actions commented on Nov 7, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  3. changed the title [-]Tool calls abort, fail. syntax error[/-] [+]Tool calls abort, fail, syntax error[/+] on Nov 7, 2025
  4. stellar-ssj commented on Nov 7, 2025

    @stellar-ssj
    Author

    in this case what i am noticing is that the agents first step happens to be creating some folders and subfolders and it is using / instead of \

    i am not sure why this is such an issue, or if something broke in the tool calling. it is still doing this even after downgrading back to .0.15.39

    for example:
    mkdir development/terminal-frontend
    The syntax of the command is incorrect. OC just aborts and stops.

    instead i can manually run; mkdir development\terminal-frontend

  5. self-assigned this
    on Nov 7, 2025
  6. Hona commented on Nov 11, 2025

    @Hona
    Member

    I am also getting this in pwsh on windows.

    Image
  7. rekram1-node commented on Nov 12, 2025

    @rekram1-node
    Collaborator

    For whatever reason this only seems to happen on windows

  8. Hona commented on Nov 12, 2025

    @Hona
    Member

    I've done some digging, weirdly the first message succeeds then all subsequent calls fail:

    Image
  9. johnem-msft commented on Nov 12, 2025

    @johnem-msft

    SyntaxError: Unexpected end of JSON input

    Image

    Windows 11 Terminal - installed via:
    winget install OpenJS.NodeJS.LTS
    npm install -g opencode-ai

    Mines a bit different I feel as it's in the prompt and I get stuck
    I actually have to: ctrl+p undo command to regain the prompt

  10. Sewer56 commented on Nov 12, 2025

    @Sewer56
    Contributor

    On my end, it's not tool calls, but specifically the bash tool. Other tools work just fine.

    Maybe something in bash.ts ...

  11. Sewer56 commented on Nov 12, 2025

    @Sewer56
    Contributor

    After some quick pairing, @Hona and I fixed the issue, in #4234

    Explanation here:

    #4234 (comment)

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 workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions