fix(core): fail steps with empty provider output after bounded retries - #40437
fix(core): fail steps with empty provider output after bounded retries#40437ServOMorph wants to merge 1 commit into
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Related PRs FoundThese PRs address similar issues with empty or incomplete provider output:
The most relevant duplicate candidate is PR #37843 which also tackles failing on empty provider output. This PR (40437) appears to be a more comprehensive fix with bounded retries and better tracking of usable output. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
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