Uh oh!
There was an error while loading. Please reload this page.
fix(core): recover missing assistant responses - #44806
Open
akirarat wants to merge 1 commit into
Open
Conversation
Contributor
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
The following comment was made by an LLM, it may be inaccurate: Related PRs FoundThe current PR (#44806) has several related PRs addressing similar issues with provider responses and session recovery:
Most notably, #41898 appears to be the most closely related, as it addresses the specific issue of failing on empty assistant responses rather than silently recording them as success. |
Contributor
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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 freeto 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#42677
Type of change
What does this PR do?
A provider can finish with
stopafter producing no non-whitespace answer or tool call. OpenCode currently records that attempt as successful and ends the session silently.This change classifies that result as incomplete provider output. Completely empty attempts use the existing transparent retry path. Attempts that contain reasoning or whitespace but no answer use the existing incomplete-stream continuation path, preserving the partial context while asking the model to finish. Normal text and tool-call completions remain terminal.
How did you verify your code works?
bun test --only-failures test/session-runner.test.ts(164 pass)bun test test/session-runner-tool-events.test.ts(17 pass)bun typecheck(32 packages)Screenshots / recordings
Not a UI change.
Checklist