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
A provider turn that streams a successful step finish but produces no visible text and no tool call (for example a reasoning-only response) was recorded as a successful step (finish: "stop"), so the session ended cleanly with an empty assistant turn.
The publisher now tracks whether any usable output was streamed: non-blank text deltas or a tool call. When a successful stream has neither, the turn is retried up to two times through the existing bounded turn-transition path. If the budget is exhausted, the step is recorded as a terminal failure (finish: "error") with a clear message instead of a false success.
How did you verify your code works?
Ran the session-runner tests in packages/core (86 tests in session-runner.test.ts, 129 across the runner files) — all green.
bun typecheck in packages/core — clean.
Updated existing empty-turn fixtures to produce real output and added tests for retry-then-fail, retry-then-recover, and tool-call (no retry).
Older related fix for handling empty stream truncations with retry logic.
The most notable is #37843 which directly addresses failing on empty provider output — this PR (40511) may be building upon or superseding that approach with the addition of bounded retry behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #37372
Type of change
What does this PR do?
A provider turn that streams a successful step finish but produces no visible text and no tool call (for example a reasoning-only response) was recorded as a successful step (
finish: "stop"), so the session ended cleanly with an empty assistant turn.The publisher now tracks whether any usable output was streamed: non-blank text deltas or a tool call. When a successful stream has neither, the turn is retried up to two times through the existing bounded turn-transition path. If the budget is exhausted, the step is recorded as a terminal failure (
finish: "error") with a clear message instead of a false success.How did you verify your code works?
packages/core(86 tests insession-runner.test.ts, 129 across the runner files) — all green.bun typecheckinpackages/core— clean.Screenshots / recordings
N/A — core change, no UI.
Checklist