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
i am constantly getting an error on opencode whether its through my OpenAI key or through an opencode go subscription or a free model i get this constant error every 1-5 minutes
ive deleted, redownloaded both CLI and desktop app, signed in and out of my openai and opencode go, changed my DNS to cloudfare and googles, did a bunch of opencode terminal commands, and even asked my gpt 6 to diagnos and fix the issue yet to no help.
Thanks for the report, and for listing everything you've already tried. Because this happens with every provider and in both the CLI and the desktop app, it's most likely caused by something between your machine and the internet. To narrow it down, could you share:
The exact error text. Please paste it as text; the screenshot is hard to read.
Network and security software: are you behind a proxy, VPN or corporate network? Do you run antivirus or firewall software that scans HTTPS/SSL traffic (e.g. Kaspersky, Avast/AVG, ESET, Bitdefender, Norton)? If so, does the error stop when that scanning is turned off?
Another network: does it still happen on a different network, e.g. your phone's hotspot?
Logs: run the CLI with opencode --print-logs --log-level DEBUG, wait until the error appears, and paste the lines around it (remove any API keys).
Which opencode --version the CLI reports, if it isn't also 2.1.4.
You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know when you're done.
These issues are related, ordered from most to least likely relevant:
Thanks for the report, and for listing everything you've already tried.
The error happens with every provider (OpenAI, OpenCode Go and free models), in both the CLI and the desktop app. That usually points to something on the network between your machine and the provider. To narrow it down, could you share:
The full error text, copied as text, not a screenshot. Include any details shown under it, such as the URL, an error code like ECONNRESET or UNABLE_TO_VERIFY_LEAF_SIGNATURE, or the host name.
Logs from a failing run. Start the CLI with opencode --print-logs, wait until the error appears, then paste the relevant lines here (please remove any API keys).
Your network setup:
Are you using a VPN, proxy, or corporate/school network?
Does your antivirus or firewall do HTTPS/SSL scanning? Avast, AVG, Kaspersky, ESET and Bitdefender often do.
Are any HTTP_PROXY, HTTPS_PROXY or NODE_EXTRA_CA_CERTS environment variables set?
What happens to the session: does the request fail and stop, or does OpenCode retry and carry on? Does it happen on another network, for example a phone hotspot?
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
We're closing this for now because we haven't heard back. We needed the full error text, logs from opencode --print-logs, and details of your network setup (VPN, proxy, or antivirus HTTPS scanning) to look into the TLS handshake errors on 2.1.4. Without them we can't tell whether OpenCode or something on the network is causing it.
If it still happens, reply here with those details and we can reopen it, or open a new issue that links to this one. Thanks for the report.
OS: Windows 10
VPN: Hiddify VPN in TUN Mode
Version: Opencode 2.2.6
Error message from opencode.log
timestamp=2026-11-07T14:44:14.988Z level=ERROR run=ca41a217 message="Failed to drain Session" cause="AI.Error: EPROTO: The TLS handshake failed. Does the server speak TLS on this port?\n at a (B:/~BUN/root/chunk-cqy77ns1.js:3:3594)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:11:1512)\n at map (native:1:11)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:11:1476)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:24:15946)\n at runLoop (B:/~BUN/root/chunk-p16d9s94.js:24:2586)\n at evaluate (B:/~BUN/root/chunk-p16d9s94.js:24:1718)\n at runInAsyncScope (node:async_hooks:207:23)\n at evaluate (B:/~BUN/root/chunk-p16d9s94.js:24:1575)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:24:6898)\n at POST\n at SessionStep.attempt (B:/~BUN/root/chunk-1abfnrtc.js:482:4059)\n at SessionStep.attempt (definition) (B:/~BUN/root/chunk-1abfnrtc.js:467:302)\n at SessionRunner.runStep (B:/~BUN/root/chunk-1abfnrtc.js:482:2974)\n at SessionRunner.runStep (definition) (B:/~BUN/root/chunk-1abfnrtc.js:482:3159)\n at SessionRunner.drain (B:/~BUN/root/chunk-1abfnrtc.js:482:6693)\n at SessionRunner.drain (definition) (B:/~BUN/root/chunk-1abfnrtc.js:482:538)\n at ServerProcess.start (B:/~BUN/root/chunk-vjacg5s7.js:3:6180)\n at ServerProcess.start (definition) (B:/~BUN/root/chunk-1abfnrtc.js:584:35594) {\n [cause]: AI.Error.Transport: EPROTO: The TLS handshake failed. Does the server speak TLS on this port?\n at a (B:/~BUN/root/chunk-cqy77ns1.js:3:3609)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:11:1512)\n at map (native:1:11)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:11:1476)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:24:15946)\n at runLoop (B:/~BUN/root/chunk-p16d9s94.js:24:2586)\n at evaluate (B:/~BUN/root/chunk-p16d9s94.js:24:1718)\n at runInAsyncScope (node:async_hooks:207:23)\n at evaluate (B:/~BUN/root/chunk-p16d9s94.js:24:1575)\n at <anonymous> (B:/~BUN/root/chunk-p16d9s94.js:24:6898) {\n [cause]: TypeError: EPROTO: The TLS handshake failed. Does the server speak TLS on this port?\n }\n}" role=server sessionID=ses_e4998dd22ffePT5RvQx0f56Exa
Activity
opencode-agent commentedon Oct 25, 2026
Thanks for the report, and for listing everything you've already tried. Because this happens with every provider and in both the CLI and the desktop app, it's most likely caused by something between your machine and the internet. To narrow it down, could you share:
opencode --print-logs --log-level DEBUG, wait until the error appears, and paste the lines around it (remove any API keys).opencode --versionthe CLI reports, if it isn't also 2.1.4.You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know when you're done.
These issues are related, ordered from most to least likely relevant:
EPROTOTLS handshake failures on the Go plan (v1)fully-autonomous commentedon Oct 25, 2026
I am also getting this consistently .
Etherite1 commentedon Oct 26, 2026
also getting this a lot, using GPT 6.1 sol via openai.
opencodejr commentedon Oct 28, 2026
Thanks for the report, and for listing everything you've already tried.
The error happens with every provider (OpenAI, OpenCode Go and free models), in both the CLI and the desktop app. That usually points to something on the network between your machine and the provider. To narrow it down, could you share:
ECONNRESETorUNABLE_TO_VERIFY_LEAF_SIGNATURE, or the host name.opencode --print-logs, wait until the error appears, then paste the relevant lines here (please remove any API keys).HTTP_PROXY,HTTPS_PROXYorNODE_EXTRA_CA_CERTSenvironment variables set?You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
opencodejr commentedon Oct 31, 2026
We're closing this for now because we haven't heard back. We needed the full error text, logs from
opencode --print-logs, and details of your network setup (VPN, proxy, or antivirus HTTPS scanning) to look into the TLS handshake errors on 2.1.4. Without them we can't tell whether OpenCode or something on the network is causing it.If it still happens, reply here with those details and we can reopen it, or open a new issue that links to this one. Thanks for the report.
ZurgInq commentedon Nov 7, 2026
OS: Windows 10
VPN: Hiddify VPN in TUN Mode
Version: Opencode 2.2.6
Error message from opencode.log