socket connection was closed unexpectedly. From more information, pass verbose: true in the second argument to fetch #2314

Open
opened 2026-02-16 17:35:05 -05:00 by yindo · 2 comments
Owner

Originally created by @jcubic on GitHub (Oct 28, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

I got an error from MCP server (Context 7):

socket connection was closed unexpectedly. From more information, pass verbose: true in the second argument to fetch

NOTE: I just assume it's MCP, it may be an internal error of OpenCode or interaction with GitHub Copilot model that I'm using.

OpenCode version

0.15.20

Steps to reproduce

You can try to create MCP that will close unexpectedly.

Screenshot and/or share link

Image

Operating System

Fedora 42

Terminal

Xfce Terminal (based on VTE)

Originally created by @jcubic on GitHub (Oct 28, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description I got an error from MCP server (Context 7): > socket connection was closed unexpectedly. From more information, pass `verbose: true` in the second argument to fetch NOTE: I just assume it's MCP, it may be an internal error of OpenCode or interaction with GitHub Copilot model that I'm using. ### OpenCode version 0.15.20 ### Steps to reproduce You can try to create MCP that will close unexpectedly. ### Screenshot and/or share link <img width="1167" height="1024" alt="Image" src="https://github.com/user-attachments/assets/1f679ece-f896-4e27-a053-4b93270b5825" /> ### Operating System Fedora 42 ### Terminal Xfce Terminal (based on VTE)
yindo added the bug label 2026-02-16 17:35:05 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 28, 2025):

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

  • #3273: MCP client failing makes opencode hang - Similar issue where MCP server failures cause opencode to become non-functional
  • #3298: Odd Session Blocking MCP Bug - Sessions hang at launch when MCP server has issues, similar to TUI breaking behavior
  • #3354: [mcp] Can't submit a message using Anthropic Sonnet 4.5 and MCP tools - MCP-related errors preventing message submission
  • #3245: Slack MCP server request fails with similar error patterns - Another MCP server error causing tool failures

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

@github-actions[bot] commented on GitHub (Oct 28, 2025): This issue might be a duplicate of existing issues. Please check: - #3273: MCP client failing makes opencode hang - Similar issue where MCP server failures cause opencode to become non-functional - #3298: Odd Session Blocking MCP Bug - Sessions hang at launch when MCP server has issues, similar to TUI breaking behavior - #3354: [mcp] Can't submit a message using Anthropic Sonnet 4.5 and MCP tools - MCP-related errors preventing message submission - #3245: Slack MCP server request fails with similar error patterns - Another MCP server error causing tool failures Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 28, 2025):

Oof it isn't supposed to pollute the chat like that, I think I wrote a fix for it that will be in next release

As for the error that happens when the upstream provider is dropping your connection (p sure)

@rekram1-node commented on GitHub (Oct 28, 2025): Oof it isn't supposed to pollute the chat like that, I think I wrote a fix for it that will be in next release As for the error that happens when the upstream provider is dropping your connection (p sure)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2314