[AGENT-LOOP] Don't fail the message when a step comes back empty - #29615
Open
pmilliotte wants to merge 2 commits into
Open
[AGENT-LOOP] Don't fail the message when a step comes back empty#29615pmilliotte wants to merge 2 commits into
pmilliotte wants to merge 2 commits into
Conversation
added 2 commits
July 28, 2026 14:48
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
An agent step that came back with no tool call and no text failed the whole message with
empty_content, even when the answer had already been written in an earlier step — the check only looked at the text streamed in the current step. It now checks the answer accumulated on the agent message, and when there is genuinely nothing anywhere it re-runs the step once with tool use disabled to force a final answer before erroring.Tests
Existing agent-loop unit tests pass; validated against a production trace where the answer was written in step 1 and step 2 came back empty.
Risk
Low — the forced re-call only happens on a step that would otherwise have failed.
Deploy Plan
mainonfront