You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot connect to API: The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch() #21643
i'm getting the same problem on v1.14.48. it doesnt happen always, but it happened consistently for a task that I was trying to run. I've tried multiple providers and the result is the same.
it's a context problem. running /compact will fix it.
if you're running a lot of terminal commands in your session, instruct the agent manually or with AGENTS.md to use a subagent and you'll see this error a lot less
I am getting this exact problem with version 1.17.8 in last few days. Compacting the context, opening new terminal did not work. I am getting this problem with both CLI and Macos app. Any solutions?
Activity
github-actions commentedon Apr 9, 2026
This issue might be a duplicate of existing issues. Please check:
verbose: truein the second argument to fetch() #8580: Same error on Linux — "The socket connection was closed unexpectedly" (closed)verbose: truein the second argument to fetch() #1692: Same error message with 32 comments of discussion (closed)Please search through existing issues before opening a new one, and consider adding any new details to an existing thread if applicable.
Hona commentedon Apr 9, 2026
what version of opencode?
opencode -vadamw199112 commentedon Apr 9, 2026
1.3.17
Hona commentedon Apr 9, 2026
please run
opencode upgradefirst - we are on version v1.4.1hhding commentedon Apr 9, 2026
same error on v1.4.1
zsl83572348 commentedon Apr 13, 2026
桌面端同样的问题,更新到最新版本也没解决,只是过了个周末就不能用了。楼主是在无网络限制的环境下出现这种情况的吗?
zsl83572348 commentedon Apr 14, 2026
我现在基本确定,应该是公司网络加了限制,api请求被拦截了。。。
chixinwang commentedon Apr 15, 2026
@zsl83572348 相关问题原因已经找到了嘛,我也遇到了这个问题。目前怀疑是我使用的代理有问题
anonymous-1-a commentedon Apr 24, 2026
Same issue. I use vLLM and opencode version is 1.14.22.
chixinwang commentedon Apr 24, 2026
@anonymous-1-a I have solved this problem. The way to do it is to open a new terminal. Although I don't know why this happened.
fatihdogmus commentedon May 11, 2026
i'm getting the same problem on v1.14.48. it doesnt happen always, but it happened consistently for a task that I was trying to run. I've tried multiple providers and the result is the same.
roboticarmgroup commentedon May 11, 2026
it's a context problem. running /compact will fix it.
if you're running a lot of terminal commands in your session, instruct the agent manually or with AGENTS.md to use a subagent and you'll see this error a lot less
satarou1 commentedon May 14, 2026
Мне помог перезаход в аккаунт/API
3L1AS commentedon May 27, 2026
Has this been fixed? Seeing it also in the latest Opencode version.
yu-zou commentedon Jun 4, 2026
Same issue on v1.15.13
furkanbr commentedon Jun 20, 2026
I am getting this exact problem with version 1.17.8 in last few days. Compacting the context, opening new terminal did not work. I am getting this problem with both CLI and Macos app. Any solutions?
rekram1-node commentedon Jun 23, 2026
Automated: closing question issues.
GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.
If this is a bug or feature request, please open a new issue with the appropriate template.