Tool calls abort, fail, syntax error #2669

Closed
opened 2026-02-16 17:36:43 -05:00 by yindo · 8 comments
Owner

Originally created by @stellar-ssj on GitHub (Nov 7, 2025).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @stellar-ssj on GitHub (Nov 7, 2025). Originally assigned to: @thdxr on GitHub. ### 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](https://github.com/user-attachments/assets/3e5ac020-f8a6-42bb-9a74-86af5f219604) ![Image](https://github.com/user-attachments/assets/7ef81e99-0342-4d28-847d-ed7d2f0def42) ### Operating System windows 10 ### Terminal wezTerm
yindo added the windowsopentuibug labels 2026-02-16 17:36:43 -05:00
yindo closed this issue 2026-02-16 17:36:43 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2025):

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

  • #3034: Same exact error message "SyntaxError: Unexpected end of JSON input" with task tool and tool calls failing, making build mode degraded/unusable

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

@github-actions[bot] commented on GitHub (Nov 7, 2025): This issue might be a duplicate of existing issues. Please check: - #3034: Same exact error message "SyntaxError: Unexpected end of JSON input" with task tool and tool calls failing, making build mode degraded/unusable Feel free to ignore if none of these address your specific case.
Author
Owner

@stellar-ssj commented on GitHub (Nov 7, 2025):

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

@stellar-ssj commented on GitHub (Nov 7, 2025): 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
Author
Owner

@Hona commented on GitHub (Nov 11, 2025):

I am also getting this in pwsh on windows.

Image
@Hona commented on GitHub (Nov 11, 2025): I am also getting this in pwsh on windows. <img width="1097" height="605" alt="Image" src="https://github.com/user-attachments/assets/5fc584a2-5e9c-4880-84d0-58ee61288aee" />
Author
Owner

@rekram1-node commented on GitHub (Nov 11, 2025):

For whatever reason this only seems to happen on windows

@rekram1-node commented on GitHub (Nov 11, 2025): For whatever reason this only seems to happen on windows
Author
Owner

@Hona commented on GitHub (Nov 11, 2025):

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

Image
@Hona commented on GitHub (Nov 11, 2025): I've done some digging, weirdly the first message succeeds then all subsequent calls fail: <img width="1929" height="1354" alt="Image" src="https://github.com/user-attachments/assets/a4a49e18-73e4-44e8-9346-bd48adf420c8" />
Author
Owner

@johnem-msft commented on GitHub (Nov 12, 2025):

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

@johnem-msft commented on GitHub (Nov 12, 2025): > SyntaxError: Unexpected end of JSON input <img width="1052" height="650" alt="Image" src="https://github.com/user-attachments/assets/669621ed-573f-42a6-9a5d-3069f8529c89" /> 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
Author
Owner

@Sewer56 commented on GitHub (Nov 12, 2025):

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

Maybe something in bash.ts ...

@Sewer56 commented on GitHub (Nov 12, 2025): On my end, it's not tool calls, but specifically the `bash` tool. Other tools work just fine. Maybe something in `bash.ts` ...
Author
Owner

@Sewer56 commented on GitHub (Nov 12, 2025):

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

Explanation here:

https://github.com/sst/opencode/pull/4234#issuecomment-3524335247

@Sewer56 commented on GitHub (Nov 12, 2025): After some quick pairing, @Hona and I fixed the issue, in #4234 Explanation here: https://github.com/sst/opencode/pull/4234#issuecomment-3524335247
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2669