Skip to content

Windows Desktop 2.0.23: socket connection closed unexpectedly during Console authentication #53317

Closed as not planned

Description

@abkhoshbakht-hub

Description

OpenCode Desktop 2.0.23 on Windows cannot complete the Console/Device authentication flow.

When trying to connect OpenCode Go / log in with a different account, the authentication flow waits for authorization and then fails with:

Error: Could not reach POST https://opencode.ai/console/auth/device/token. This failed before the server returned an HTTP response.

The OpenCode Desktop log also shows:

failed to load OpenCode provider config

Transport error (GET https://opencode.ai/console/api/v2/config)

cause="TypeError: The socket connection was closed unexpectedly."

Environment

  • OS: Windows
  • OpenCode Desktop: 2.0.23
  • Installed standalone CLI: 1.18.34
  • OpenCode Go provider
  • Network connection is working normally
  • No proxy environment variables are configured

Network tests

curl -I https://opencode.ai

returns:

HTTP/1.1 200 OK

Also:

curl -v https://opencode.ai/console/auth/device/token

successfully establishes the TLS connection and receives:

HTTP/1.1 404 Not Found

The 404 is expected because curl sends GET, while the authentication endpoint uses POST. The important point is that the connection to opencode.ai itself succeeds.

Additional information

The problem occurs inside OpenCode Desktop's HTTP client. The socket is closed unexpectedly when Desktop tries to access:

https://opencode.ai/console/api/v2/config

and the device authentication endpoint also fails before receiving an HTTP response.

Please investigate whether this is a Windows/Desktop 2.0.23 networking or HTTP client issue, particularly with the Console authentication/config endpoints.

I can provide the exported OpenCode logs if needed.

Activity

  1. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

    This issue might be related to an existing report. Please compare the symptoms:

  2. neriousy commented on Oct 5, 2026

    @neriousy
    Member

    can't reproduce, any vpns etc?

  3. opencodejr commented on Oct 27, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and the curl tests. They help.

    A maintainer couldn't reproduce this earlier and asked about VPNs. Since the socket is closed before any HTTP response comes back, it may depend on something specific to your machine or network. Could you share:

    1. Whether you use a VPN, firewall, antivirus or other security software, especially anything that inspects HTTPS traffic (e.g. Zscaler, CrowdStrike, Kaspersky, ESET, Avast, corporate endpoint agents). If you can, try once with it turned off.
    2. Your Windows version (e.g. Windows 11 24H2).
    3. Whether it still happens on the latest OpenCode Desktop release. 2.0.23 is several releases behind.
    4. Whether signing in with the opencode CLI from the same 2.x version works on that machine. That would tell us whether the problem is in Desktop or in the network.
    5. The exported logs you offered, covering one failed sign-in attempt. Please remove any tokens or account details first.

    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 related issues may help, ordered from most to least likely to match:

  4. opencodejr commented on Oct 30, 2026

    @opencodejr
    Contributor

    We're closing this for now because we haven't heard back. We couldn't reproduce the Console sign-in socket error on our side, so we needed details about your setup to look further: any VPN, firewall or security software, whether it still happens on the latest Desktop release, whether the 2.x CLI can sign in on the same machine, and the exported logs.

    If it still happens, please reply here with those details and we can reopen it. Thanks for the report! If the error turns out to come from connections dropped by a proxy or security software, #54160 tracks that.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions