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
{{ message }}
Repository navigation
A provider stream that dies mid-generation ends the turn silently (no error, no retry) #542
When the provider connection drops mid-generation (observed with OpenCode Zen stream deaths), the AI SDK synthesizes a step-finish with reason unknown and the turn just stops: the assistant message completes with finish unknown, no error is recorded, nothing is retried, and the UI shows no retry/stall marker. From the user's side the run simply died.
Expected: a stream that ends without a definitive finish reason is a retryable stream failure - it should enter the standard retry pipeline (backoff + the retry status indicator) and only surface a terminal error after retries are exhausted.
Reproduced with a failing test: mock LLM stream fails mid-generation -> loop returns after a single request with no error instead of retrying.
Note: the reasoning watchdog's own timeout error (reasoning stream timed out after 1m without new tokens) is already classified retryable; the gap is the silent premature-end path.
Fixed by squash merge 485ae47 (PR #544): turns whose provider stream dies mid-generation are now detected and retried, with the step finish-reason witness reset at every step start so a completed step is never mistaken for a stream cut.
Activity
agenteinstinct1-max commentedon Oct 23, 2026
Fixed by squash merge 485ae47 (PR #544): turns whose provider stream dies mid-generation are now detected and retried, with the step finish-reason witness reset at every step start so a completed step is never mistaken for a stream cut.