Skip to content

Bug]: Persistent ECONNRESET on Windows with VPN/Proxy and Telegram Bot integration (connection drops after initial response) #60642

Closed as not planned

Description

@vasyaget7788-arch

Describe the bug
OpenCode consistently fails with a ECONNRESET error across all models. The connection appears to establish initially (the model starts generating a response), but the socket is suddenly closed unexpectedly. This happens both in the desktop UI and when using the Telegram bot integration (opencode-telegram.service).

The error message:
ECONNRESET: The socket connection was closed unexpectedly. For more information, pass 'verbose: true' in the second argument to fetch()
The app attempts to retry (e.g., "Attempt 2 — retrying") but ultimately fails.

Activity

  1. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    Thanks for the report! ECONNRESET has several possible causes, and a lot of reports came in this week, so we need a few details to work out which one you're hitting:

    1. Your OpenCode version (opencode --version, or the version shown in the desktop app), your Windows version, and how you installed OpenCode.
    2. The provider and model you're using (for example the built-in free OpenCode Zen models, OpenCode Go, or your own API key with a provider).
    3. VPN/proxy: does it fail with the VPN on, with it off, or both? Is HTTP_PROXY/HTTPS_PROXY set, or does the VPN route all traffic (TUN mode)? Roughly where in the world are you, and which ISP do you use?
    4. When it drops: you said the model starts answering and then the connection closes. Does that happen within seconds, or only on longer responses or tasks? Does a short prompt like hi work?
    5. Does it also happen in the plain TUI or with opencode run "hi", without the Telegram bot? (The Telegram integration looks like a third-party project, so it helps to rule it out.)
    6. Any logs from around the failure, if you can get them.

    You can reply here with the details or edit the issue. If you edit it, please also leave a short comment saying you've updated it, so we know you're done.

    These existing issues may be related, ordered from most to least likely. Please check whether one of them already covers your problem:

  2. opencodejr commented on Nov 2, 2026

    @opencodejr
    Contributor

    We haven't heard back, so I'm closing this issue for now. We still needed your OpenCode version, the provider and model, whether it fails with the VPN/proxy on, off or both, and whether it also happens without the Telegram bot. Without those we can't tell which cause of ECONNRESET you're hitting.

    If the connection fails before any response, on a network where a VPN makes it work, #60399 most likely covers it. You can follow that issue instead.

    If it still happens and it's a different problem, please reply here with those details or open a new issue, and we'll take another look. Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions