anomalyco / anomalyco/opencode

Runs repeatedly aborted by `Provider finish_reason: network_error` — no auto-retry, long sessions die mid-task

Open
#44,540 1 comment 1 reaction 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 23, 2026.

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

Description

(Prepared 23 Aug 2026 from local logs at ~/.local/share/opencode/log/opencode.log)


Title: Runs repeatedly aborted by Provider finish_reason: network_error — no auto-retry, long sessions die mid-task

Version: OpenCode.app 1.18.21, macOS Sequoia (Apple Silicon)

Provider / model: opencode / x-preview-f-free

What happened

On 23 Aug 2026, long-running agentic sessions kept dying mid-task with:

ERROR message=process error="Provider finish_reason: network_error"
stack="ProviderResponseStreamError: Provider finish_reason: network_error
    at Object.toLLMEvents (...node-4c_8o6aE.js:448336:36)"

18 occurrences across 4 distinct sessions between 09:47 and 20:07 UTC. One session
("Felloh - Dolphin booking payment link via Playwright", ses_fd0defd6dffehQvpBJ243vQIrh)
was hit 9 times over ~1 hour and became effectively unusable — every retry died the same way,
and I eventually had to reconstruct its compaction summary by hand into a markdown handoff file.

The local network was fine throughout (browsing, git, npm all working normally, other apps unaffected),
and the failures span 10+ hours, so this looks like upstream/stream handling rather than my connectivity.

Expected behaviour

A transient mid-stream failure should be retried automatically (a few attempts with backoff)
before surfacing an error to the user — ideally resuming from the last received chunk so the
run survives instead of aborting.

Actual behaviour

The run aborts immediately; the user must manually re-send, and repeated occurrences make
long sessions unworkable and risk losing compaction state.

Repro / evidence

  • Log: ~/.local/share/opencode/log/opencode.log, search finish_reason: network_error
  • Example line:
timestamp=2026-08-23T19:45:14.162Z level=ERROR run=a1cbc31f message=process \
session.id=ses_fd0defd6dffehQvpBJ243vQIrh messageID=msg_03025e3ed001Hp4jTAR47EqoD0 \
error="Provider finish_reason: network_error"
  • Happy to attach the full log if useful.

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.