anomalyco / anomalyco/opencode

"opencode run": zero-chunk provider stream stall never surfaces — no timeout, no retry, no exit (1.18.30)

Open
#48,675 3 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Sep 12, 2026.

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

Description

Symptom

Three parallel headless opencode run workers (one-shot implement agents, distinct
sessions, same provider/model opencode-go / muse-spark-1.3-contributor) all stalled
within 17 seconds of each other. Each session's LAST log line, overall, is the
stream open:

timestamp=2026-09-12T15:58:30.124Z message=stream providerID=opencode-go modelID=muse-spark-1.3-contributor session.id=ses_aaa step=6
timestamp=2026-09-12T15:58:42.856Z message=stream ... session.id=ses_bbb step=9
timestamp=2026-09-12T15:58:47.110Z message=stream ... session.id=ses_ccc step=9

Zero follow-up events on all three: no chunks, no finish, no retry, no error, no
timeout. Grep for retry|error|timeout|chunk across the three sessions returns
nothing. The processes later vanished with no DONE, no commits, no exit diagnostics
— from the driver's side this is silent work loss (one worker had green tests,
uncommitted).

Why existing fixes don't cover it (1.18.30)

  • v1.18.21 "continue on unknown finish" needs a finish reason — here there is none,
    the stream never starts delivering.
  • v1.18.27 5-minute header/chunk timeouts never fired (nothing logged at +5min or
    after, across all three sessions). Either the chunk watchdog arms only after the
    first chunk/headers, or the opencode-go provider path bypasses it.
  • #26167 (empty-truncation retry) and #40061 (fail loud on missing finish) likewise
    key off stream events; a zero-event stream triggers none of them.

So the never-starting stream — message=stream with zero subsequent events — is
still an unbounded silent stall on latest.

Expected

A watchdog on event-less streams in run mode: after N minutes with zero stream
events, fail loudly (non-zero exit + stderr naming the session and the last event
age), so external drivers can kill + relaunch instead of discovering silent death
via file mtimes.

Repro shape (from our logs)

  • 3x opencode run "<long implement prompt>" in separate dirs, same model,
    provider hiccup window; all stall at message=stream, steps 6-9, mid-task.
  • Discriminator vs slow run: absolute zero log lines after the stream line
    (not slow progress — no progress).

Happy to provide full session log excerpts on request.

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.