How to debug tool use / filesystem access errors? #1056

Closed
opened 2026-02-16 17:29:18 -05:00 by yindo · 14 comments
Owner

Originally created by @evanhempel on GitHub (Aug 1, 2025).

Originally assigned to: @thdxr on GitHub.

Just set up opencode on a fresh Ubuntu 2024.04 LTS VM, followed the website directions, using openrouter API key. Tried horizons-alpha, Qwen-coder, and Claude Sonnet 3.7. In all cases any filesystem access / tool use fails with ShellError: Failed with exit code 128.

I've tried turning on debug logging, there's no obvious errors ...

Originally created by @evanhempel on GitHub (Aug 1, 2025). Originally assigned to: @thdxr on GitHub. Just set up opencode on a fresh Ubuntu 2024.04 LTS VM, followed the website directions, using openrouter API key. Tried horizons-alpha, Qwen-coder, and Claude Sonnet 3.7. In all cases any filesystem access / tool use fails with `ShellError: Failed with exit code 128`. I've tried turning on debug logging, there's no obvious errors ...
yindo closed this issue 2026-02-16 17:29:18 -05:00
Author
Owner

@wagoodman commented on GitHub (Aug 2, 2025):

I'm having the same problem that started today (happening intermittently, but a lot)

@wagoodman commented on GitHub (Aug 2, 2025): I'm having the same problem that started today (happening intermittently, but a lot)
Author
Owner

@DiogoDoreto commented on GitHub (Aug 3, 2025):

I'm running opencode inside a container and I'm consistently getting the same error. Logs are not showing anything useful.

The last working version for me is 0.3.61.

@DiogoDoreto commented on GitHub (Aug 3, 2025): I'm running opencode inside a container and I'm consistently getting the same error. Logs are not showing anything useful. The last working version for me is `0.3.61`.
Author
Owner

@dysangel commented on GitHub (Aug 3, 2025):

I'd find this very useful too for figuring out how to get locally served GLM Air working properly with opencode

@dysangel commented on GitHub (Aug 3, 2025): I'd find this very useful too for figuring out how to get locally served GLM Air working properly with opencode
Author
Owner

@thdxr commented on GitHub (Aug 3, 2025):

anyone with this problem can you do realpath ~ does this work?

@thdxr commented on GitHub (Aug 3, 2025): anyone with this problem can you do `realpath ~` does this work?
Author
Owner

@thdxr commented on GitHub (Aug 3, 2025):

also can i see a screensot of the error

@thdxr commented on GitHub (Aug 3, 2025): also can i see a screensot of the error
Author
Owner

@rekram1-node commented on GitHub (Aug 3, 2025):

I just got this error when llm tried to use context7 (I am using local mcp):

Image

Also:

realpath ~
/Users/aidencline
@rekram1-node commented on GitHub (Aug 3, 2025): I just got this error when llm tried to use context7 (I am using local mcp): <img width="382" height="95" alt="Image" src="https://github.com/user-attachments/assets/9412aff0-758b-4c5a-b39f-1d9e16e23eb3" /> Also: ```zsh realpath ~ /Users/aidencline ```
Author
Owner

@DiogoDoreto commented on GitHub (Aug 3, 2025):

sh-5.3# realpath ~
/root
Image
@DiogoDoreto commented on GitHub (Aug 3, 2025): ``` sh-5.3# realpath ~ /root ``` <img width="1670" height="481" alt="Image" src="https://github.com/user-attachments/assets/aa2c157f-568d-40fc-979a-bf4e9b149884" />
Author
Owner

@d3vr commented on GitHub (Aug 3, 2025):

realpath ~
/home/d3vr

opencode v0.3.120

Image
@d3vr commented on GitHub (Aug 3, 2025): ```shell realpath ~ /home/d3vr ``` opencode v0.3.120 <img width="1009" height="606" alt="Image" src="https://github.com/user-attachments/assets/566d7ced-84bd-4f9e-81af-93a710b633bd" />
Author
Owner

@d3vr commented on GitHub (Aug 3, 2025):

v0.3.121 seems to have fixed the issue for me, can't reproduce it. @thdxr

@d3vr commented on GitHub (Aug 3, 2025): `v0.3.121` seems to have fixed the issue for me, can't reproduce it. @thdxr
Author
Owner

@thdxr commented on GitHub (Aug 3, 2025):

^ that error was from parallel tool calls - that's fixed now

@thdxr commented on GitHub (Aug 3, 2025): ^ that error was from parallel tool calls - that's fixed now
Author
Owner

@thdxr commented on GitHub (Aug 3, 2025):

@evanhempel i'm wondering if your issue is fixed

@thdxr commented on GitHub (Aug 3, 2025): @evanhempel i'm wondering if your issue is fixed
Author
Owner

@DiogoDoreto commented on GitHub (Aug 3, 2025):

even though my error code was different, the latest version fixed it too. Thanks!

@DiogoDoreto commented on GitHub (Aug 3, 2025): even though my error code was different, the latest version fixed it too. Thanks!
Author
Owner

@evanhempel commented on GitHub (Aug 4, 2025):

@thdxr Can confirm this fix worked. Thanks!

@evanhempel commented on GitHub (Aug 4, 2025): @thdxr Can confirm this fix worked. Thanks!
Author
Owner

@trvon commented on GitHub (Aug 12, 2025):

I was not running into this issue but I started after the previous days worth of updates. I do not know which specific one.

ShellError: Failed with exit code 128
@trvon commented on GitHub (Aug 12, 2025): I was not running into this issue but I started after the previous days worth of updates. I do not know which specific one. ``` ShellError: Failed with exit code 128 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1056