Skip to content

[BUG] Incorrect handling of network errors causes the session to freeze indefinitely #41982

Closed as not planned

Description

@VirtualZer0

Description

The current version (and all previous versions of OpenCode) does not handle network errors properly, which makes it impossible to use the software effectively.

To be honest, I wholeheartedly hate whoever wrote the network error-handling code for OpenCode. It's a terrible piece of work, and I only continue to use it, albeit with some difficulty, because of its plugin ecosystem. I REALLY hope this gets fixed, because I don't understand how anyone could have designed a system that doesn’t take into account real-world problems, where the network isn't always stable.

I could submit a pull request, but the list of one thousand open PRs doesn’t give me any reason to be optimistic that my changes will be accepted. Not to mention the developers’ approach of closing bugs without fixing them simply because there hasn’t been any activity, even though the bug EXISTS. And this bug is so critical that it makes even minimally normal operation simply impossible.

Plugins

none, replayable without any plugins

OpenCode version

1.18.16

Steps to reproduce

  1. Start a long-running job with heavy subagents
  2. Your network packet was dropped/some other network error occurred
  3. In the best-case scenario, your random subagent stops and returns an empty result; in the worst-case scenario, it freezes permanently, crashing your ENTIRE session - either without any error messages at all or with an "unknown certificate verification error" that doesn't even correspond to an actual error. And you can't even force subagent to stop, since the developers figured that absolutely no one would ever need this feature.
  4. Enjoy your lost cache, your paused job, and the need to manually resume your ENTIRE job.

Screenshot and/or share link

Image Image

Operating System

Windows 10

Terminal

Windows Terminal

Activity

  1. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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