Skip to content

feat(stream): catch transport errors and retry#312

Open
taciturnaxolotl wants to merge 1 commit into
mainfrom
catch-transport-errors
Open

feat(stream): catch transport errors and retry#312
taciturnaxolotl wants to merge 1 commit into
mainfrom
catch-transport-errors

Conversation

@taciturnaxolotl

@taciturnaxolotl taciturnaxolotl commented Jul 14, 2026

Copy link
Copy Markdown
Member

When a provider's HTTP/2 connection resets a stream mid-response, the transport
surfaces an error like:

stream error: stream ID 27; INTERNAL_ERROR; received from peer

These are transient transport failures (the server dropped the stream etc) but they were treated as non retriable. A single flaky stream would end
the turn with an ugly, low-level error message even though retrying on a fresh
connection almost always succeeds. The existing retry path already covered
io.ErrUnexpectedEOF and incomplete-stream endings, but stream resets fell
through because they aren't an EOF, aren't a net.Error, and carry no HTTP
status code.

upstream crush pr charmbracelet/crush#3305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant