anomalyco / anomalyco/opencode

unstable internet leaves opencode in stuck state

Open
#40,625 4 comments 1 reaction 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 5, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

I have unstable internet, which drops packets every few hours. This causes opencode to get stuck in a state where it doesn't error out. It just seems to stall. Permanently saying "Esc to interrupt" and nothing happening.
Ive tried to make a watchdog script, but that stalls when opencode stalls.

Some info from gemini:
When a network connection drops mid-stream (specifically a silent TCP drop or packet loss without an explicit FIN or RST packet from the server), OpenCode hangs indefinitely in the streaming/busy state. The TUI remains stuck displaying "ESC to interrupt", no incoming tokens are rendered, and no request timeout is triggered. Furthermore, the process hangs or blocks the Node/Bun event loop during this state, preventing internal JavaScript plugin hooks or external IPC/events from recovering or receiving command signals.

Plugins

No response

OpenCode version

1.18.11

Steps to reproduce

Start an interactive session in opencode.

Submit a prompt that generates a multi-second response.

Mid-stream, simulate a silent network drop (e.g., disable Wi-Fi, pull Ethernet cable).

Observe OpenCode's behavior.

Screenshot and/or share link

No response

Operating System

linux

Terminal

kde teminal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.