Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This was referenced Sep 26, 2026
This branch has not been deployed
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.
Issue for this PR
Closes #32366
Type of change
What does this PR do?
When a provider returns an empty response with an
unknownfinish reason, the session prompt loop can continue creating new assistant turns indefinitely. The session remains busy, leaving the UI stuck on “thinking” without displaying an error or recovering to an idle state.This PR checks the completed assistant turn before continuing the prompt loop. If the finish reason is
unknownand the turn contains no text, reasoning, or tool output, it records aProvider returned an empty responseerror, publishes the session error, and returns the session to an idle state.Turns that contain output continue through the existing path, so the change is limited to genuinely empty provider responses.
A deterministic test-provider response and a CLI regression test were added for this case.
How did you verify your code works?
I tested the changes locally with:
bun typecheckbun test --timeout 30000 test/session/processor-effect.test.tsbun test --timeout 30000 test/cli/run/stream.transport.test.tsThe regression test confirms that an empty unknown provider response exits promptly with a nonzero status and reports the expected error.
Screenshots / recordings
Not applicable; this is a backend/CLI behavior change.
Checklist