You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TUI freezes and becomes unresponsive when the LLM provider stream errors out mid-flight with a "fetch failed" error. The UI enters a waiting state with no recovery path — no timeout fires, and the interface stays frozen indefinitely while the process continues to consume ~31% CPU in a render loop.
Steps to Reproduce
Start opencode with an LLM provider that requires a network connection
Send a message to the agent
Have the network connection drop or the provider return an error mid-stream
Observe: the UI freezes and never recovers
Expected Behavior
The UI should detect the stream failure and display an error, allowing the user to retry or exit cleanly.
Actual Behavior
TUI hangs indefinitely — no error displayed, no way to recover without killing the process
Process stays alive consuming ~31% CPU (stat: Rl+)
Main thread blocked on ep_poll (epoll waiting for I/O that never arrives)
Log shows the stream error was recorded, but the UI never unblocks
Main thread: ep_poll — blocked waiting for I/O event that never fires
No subprocess leak, no DB lock, SQLite WAL clean
Environment
opencode version: 1.18.25
OS: Ubuntu 24.04.4 LTS (Noble Numbat)
Kernel: 6.8.0-138-generic
Platform: Linux x86_64
Node: v24 (Bun runtime)
Provider: zcode (Claude Sonnet 4.6 proxy)
Suggested Fix
Add a stream-level timeout or watchdog: if a stream has errored and the promise has not resolved within N seconds, surface the error in the UI and unblock the render loop. A Promise.race(stream, timeout) pattern around the provider stream would prevent the indefinite wait.
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.
Activity
github-actions commentedon Sep 1, 2026
This issue might be a duplicate of existing issues. Please check:
timeout: false; silent stall never triggers retry)thdxr commentedon Oct 11, 2026
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊