fix(core): recover missing assistant responses - #44806
Open
akirarat wants to merge 2 commits 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. 👍 |
akirarat
force-pushed
the
missing-response-recovery
branch
from
August 26, 2026 18:22
e74c2d1 to
d5b058f
Compare
akirarat
force-pushed
the
missing-response-recovery
branch
from
August 26, 2026 20:05
2b3fc45 to
0e960a3
Compare
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 #42677
Type of change
What does this PR do?
A provider can stop or fail after producing only reasoning or whitespace, leaving the session with no answer or tool call. OpenCode currently treats some of these attempts as successful and ends the run silently.
This change tracks whether an attempt produced a non-whitespace answer or any tool activity. A normal stop that reports output tokens but no usable content gets one bounded continuation. A provider failure after reasoning or whitespace uses the existing bounded incomplete-stream recovery path. Failures after visible text or tool activity remain terminal so completed work is not replayed.
How did you verify your code works?
bun test test/session-runner.test.ts --timeout 30000inpackages/core(Bun 1.3.14; 178 pass)bun run typecheckinpackages/coreScreenshots / recordings
Not a UI change.
Checklist