Skip to content

Answer streaming stops after an LLM runs out of retries and uses a default value #413

Open

Description

@WH-2099

I ran Start → LLM → Answer 1 → Answer 2 with two retries and a default text of fallback.
The LLM sent partial and failed. Both retries failed before sending any text.

Answer 1 uses A[{{#llm.text#}}]END and Answer 2 says |NEXT.
Both Answers finish, and the run output is A[fallback]END|NEXT.
The stream stops at A[partial. Once the default takes over, the client should still get ]END and |NEXT.

Reproduced on main at eb75e38 while testing #395.

Activity

  1. self-assigned this
    on Nov 18, 2026
  2. dosubot commented on Nov 18, 2026

    @dosubot

    This points to a root response-filter cursor that never gets released. At eb75e38, root chunks go into stream_buffers, but retry handling and finish_source() close only the separate source_streams used by child frames. So the handled exception does not close the root llm.text buffer. [1] [2]

    Once partial has been buffered, _read_root_variable_chunks() refuses the variable-pool fallback because has_stream_events is true. Without a closed selector, it also refuses to advance past llm.text. That explains why committing fallback does not release ]END or the following Answer. [3]

    The fix direction is to settle the root source when retries terminate in a handled failure, preserving already displayed text while allowing the template cursor to advance. Closing on every retry would be premature because later attempts can still emit chunks. Your reproduction makes a useful regression assertion: the concatenated stream should be A[partial]END|NEXT, independently of the completed output using fallback. This follows the filter's existing separation between source closure and variable-value fallback. [4]

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about graphon

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions