Skip to content

OpenCode Desktop terminates tool call with no information #35485

Description

@gnu-lorien

Description

OpenCode is regularly terminated my tool calls with no extra information about why they failed. It will simply show a red line with the text "terminated" and no other information that can be used to diagnose the problem.

Looking through the OpenCode logs I see the following error message around the time when this happens:

timestamp=2026-07-05T22:46:19.420Z level=ERROR run=743e177a message=process session.id=ses_0cb9208f4ffegwD7weI3vzCltS messageID=msg_f347157f5001Mni7ORTr206WKa error=terminated stack="TypeError: terminated\n    at Fetch.onAborted (node:internal/deps/undici/undici:13602:53)\n    at Fetch.emit (node:events:509:28)\n    at Fetch.terminate (node:internal/deps/undici/undici:12732:14)\n    at Object.onError (node:internal/deps/undici/undici:13728:38)\n    at Request.onError (node:internal/deps/undici/undici:3073:31)\n    at Object.errorRequest (node:internal/deps/undici/undici:1932:17)\n    at Socket.onHttpSocketClose (node:internal/deps/undici/undici:7726:14)\n    at Socket.emit (node:events:521:24)\n    at TCP.<anonymous> (node:net:350:12)"

This seems to be a TCP error without much information. I happen to be running the TCP server that's being communicated with as a local LM Studio. The information on that side isn't much more useful:

2026-07-05 18:46:19  [INFO]
 [LM STUDIO SERVER] Client disconnected. Stopping generation... (If the model is busy processing the prompt, it will finish first.)
2026-07-05 18:46:19 [DEBUG]
 63.23.346.357 W srv          stop: cancel task, id_task = 4358
2026-07-05 18:46:19  [INFO]
 [qwen3.6-27b-mtp] Finished streaming response
2026-07-05 18:46:19 [DEBUG]
 [LLMProcess][ServerPort] Received communication warning from the client (channelUnknown): Received channelSend for unknown channel, channelId = 76

This is usually caused by communication protocol incompatibility. Please make sure you are using the up-to-date versions of the SDK and LM Studio.

Note: This warning was produced by the client and is printed on the server for convenience.
2026-07-05 18:46:19 [DEBUG]
 [LLMProcess][ServerPort] Received communication warning from the client (channelUnknown): Received channelSend for unknown channel, channelId = 76

This is usually caused by communication protocol incompatibility. Please make sure you are using the up-to-date versions of the SDK and LM Studio.

Note: This warning was produced by the client and is printed on the server for convenience.

I'm not sure where to begin to diagnose what's going wrong since OpenCode provides so little information about why it terminated the session.

This may be related to #30221, but the issue that's linked to claims its fixed. I'm on latest though so something else is going on.

Plugins

No response

OpenCode version

1.17.13

Steps to reproduce

Unfortunately I do not have a consistent reproduction. Sometimes my tools calls simply fail like this with no explanation. Sometimes trying again works. Other times a restart works. Other time it just fails entirely and I can't ever get OpenCode to do the tool call.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Auto (Default)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions