Skip to content

OpenCode is not working #60534

Closed as duplicate
Closed as duplicate

Description

@Pavroz

Hello! Yesterday, OpenCode was working fine—no VPN was required. Today, however, it wouldn't work without a VPN, and now it won't even load when a VPN is enabled. I’m getting the following error: "ECONNRESET: The socket connection was closed unexpectedly. For more information, pass 'verbose: true' in the second argument to fetch()". I purchased a Go subscription yesterday; I’m not sure if that’s related, but it stopped working precisely today. I’m not sure what to do or how to fix this error.

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the report, and sorry OpenCode suddenly stopped working for you.

    I think this is a duplicate of #60399. Several people started seeing exactly this ECONNRESET: The socket connection was closed unexpectedly error on Oct 29–30, all at once and without updating OpenCode. Without a VPN, requests fail; with a VPN, they work. The cause found there is network filtering at some ISPs: it drops OpenCode's secure (TLS) connection to opencode.ai before any request is sent. Your Go subscription is very likely unrelated, because free-tier users are hitting the same thing at the same time. #60399 has measurements and a workaround.

    Possible duplicates and related issues, ordered from most to least likely:

    You mentioned it now fails even with your VPN on. That may mean your VPN's exit is affected too, so it's worth trying another VPN server. If it still fails with a working VPN, or if curl https://opencode.ai/inference/v1/models also fails on your machine, please reply here with your OpenCode version (opencode --version), OS, whether you use the desktop app or the CLI, and your country/ISP.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. Pavroz commented on Oct 30, 2026

    @Pavroz
    Author

    OpenCode version 2.2.1
    Windows 10

    I don’t know what to do; I urgently need to get some work done, but OpenCode isn’t working. Please help!

  3. MLGSW4G commented on Oct 30, 2026

    @MLGSW4G

    @Pavroz,
    Your Go subscription isn't the cause — free models fail the same way, and it isn't your account (see #60399).

    1. Confirm what's failing: curl.exe -sS -o NUL -w "%{http_code}" https://opencode.ai/inference/v1/models. If that prints 200 while OpenCode fails, it's the TLS-handshake filtering, not OpenCode itself.
    2. Temporary fix that needs no VPN: npm i -g [email protected]. That build still ships the older runtime and isn't affected; 1.19.4 and later, including all of 2.2.x, switched to a newer one. If npm fails with ECONNRESET too, download the v1.19.3 release archive from GitHub instead.
    3. If your VPN "doesn't help": that usually means split-tunnel or a browser-only VPN. Run the same curl.exe command with the VPN on — if it fails there too, the CLI's traffic isn't going through the tunnel.
    4. If you already use zapret or GoodbyeDPI, adding opencode.ai to its hostlist fixes it without downgrading.
  4. Pavroz commented on Oct 30, 2026

    @Pavroz
    Author

    Version v1.19.3 did the trick—OpenCode seems to be working, but for how long? Will this issue persist in future releases, meaning it’s better not to update the app?

  5. MLGSW4G commented on Oct 30, 2026

    @MLGSW4G

    Good — that confirms the boundary: 1.19.3 is the last build on the older TLS runtime, 1.19.4 and 2.2.x moved to the newer one.

    The cause is on the network side: Russian DPI drops the TLS handshake to opencode.ai when the client offers a post-quantum key share, which also makes the hello ~1.5 KB. Whether that's aimed at the key or just at handshakes it can't parse, nobody outside the operators knows.

    So stay on 1.19.3 while you need to work, and update when a release adds a fallback. 2.2.x is usable today with a full-tunnel VPN, or with opencode.ai in a DPI-bypass hostlist. Details and measurements: #60399.

  6. Pavroz commented on Oct 30, 2026

    @Pavroz
    Author

    I still don’t quite understand why everything was working yesterday and throughout the night, but then stopped this morning - if you happen to have an answer for that.

  7. MLGSW4G commented on Oct 30, 2026

    @MLGSW4G

    Most likely because a DPI (ТСПУ) rule was deployed overnight, not because anything changed on your machine. Filtering changes are pushed centrally and take effect without notice, and several unrelated Rostelecom users reported the same failure this morning (Oct 29–30) without updating anything. From outside we can't see the deployment, so the exact hour is guesswork — but your client didn't change, which leaves the network as the only variable. The same mechanism can also be rolled back or widened, which is why nobody can promise how long 1.19.3 will keep working.

  8. Ap6y3ukLeo commented on Oct 30, 2026

    @Ap6y3ukLeo

    I do not have administrator rights on my office PC and I use OpenCode free models. As far as I know, version 1.19.3 does not support them. What can I do?

  9. MLGSW4G commented on Oct 30, 2026

    @MLGSW4G

    Confirmed on a fresh IP: 1.19.3 does work with free models — it returned a normal completion, not a quota message. The official threshold is 1.18.0: a 1.17.20 build with a valid free model is rejected with OpenCode 1.18.0 or newer is required to use the free tier.

    So the version isn't your problem. That said, v1 is deprecated for the free tier and the gate is enforced server-side, so 1.19.3 is a temporary fix. For anything long-lived, a DPI bypass (VPN or a hostlist entry) with v2 is the more stable solution.

  10. opencodejr commented on Oct 31, 2026

    @opencodejr
    Contributor

    Closing this as a duplicate of #60399. We waited a day for a reply in case your problem turned out to be different, and haven't heard back. The ECONNRESET error that started suddenly on Oct 30 matches #60399: some ISPs' filtering drops OpenCode's secure connection to opencode.ai. Please follow #60399 for updates and the workaround.

    If it still fails with a working VPN, or if curl https://opencode.ai/inference/v1/models also fails on your machine, please reply here with your OpenCode version, OS and ISP and we can take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions