Skip to content

ECONNRESET: The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch() #53829

Description

@shadyuwugurl

Description

dunno what this means

ive flushed my dns cache

pinned it to ipv4 pinned it to ipv6

deleted a few things

also bricked most my plugins

only happens on 1 sessions

Plugins

No response

OpenCode version

v2.0.24

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macis 27

Terminal

opencode desktop gui

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the report! To look into this we need a bit more detail:

    1. Provider and model used in the affected session (e.g. OpenCode Zen/Go, Anthropic, OpenAI, or a custom/OpenAI-compatible endpoint, plus any proxy or VPN in between).
    2. When the error appears: on every message in that session, right after a specific action (reading files, a tool call, an MCP server), or only once the session got long? Does a new session with the same model and project work?
    3. About how large is the affected session (number of messages, or the context usage shown in the app)?
    4. Logs from around the time of the error, if you can get them (on macOS: ~/.local/share/opencode/log/), or a screenshot of the error in the app.

    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.

    These issues might be related, ordered from most to least likely to be relevant:

  2. shadyuwugurl commented on Oct 8, 2026

    @shadyuwugurl
    Author

    1
    opencode zen
    muse spark 1.3

    2
    the last message of specific session
    can't get past it
    tried different models and providers and thinking types

    3
    relatively large
    still in context
    about 100 messages
    at 400k tokens[

    (tried to upload file)

    ](url)

    its 30mb

    tried different log (original)

    app error

    Image Image Image Image Image Image

    attached screen shots

  3. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the details and screenshots! This one is hard to reproduce without a real provider and your session. The connection gets reset while the request for that one long session (about 100 messages, about 400k tokens) is being sent, and it happens no matter which provider or model you pick. That suggests the size or content of the session is the problem, not your network. Our test environment uses a simulated model, so it can't trigger this, and a maintainer with provider access will need to look into it.

    Things that would help, if you can:

    • An export of the affected session (e.g. opencode export <sessionID> from the CLI). Remove anything private first. If it's too big to attach, a gist or a zipped file works, or let us know roughly how big it is.
    • Whether the session contains any very large attachments or tool outputs (big files, images, long command output).

    Two things that might get you going again: try compacting/summarizing the session (/compact), or start a new session and paste in a short summary of where you were. Related reports: #46088 and #51537 (ECONNRESET once a session's requests get large).

  4. shadyuwugurl commented on Oct 8, 2026

    @shadyuwugurl
    Author

    if it also helps

    most my plugins are also bugged as of this

    I fixed it

    by going back a few messages

    and forking it

    and then hitting compress

    it uses a lot of images and tool calls

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions