fix(session): normalize wrapped subagent stream errors#28898
Open
ririnto wants to merge 1 commit into
Open
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found one PR that appears closely related: Related PR:
The current PR (#28898) is specifically about normalizing wrapped subagent stream error envelopes before they become generic errors, while #26167 handles empty stream truncations. They both deal with session stream error handling but address different specific scenarios. No exact duplicate PRs found - this appears to be addressing a distinct issue (#21979) related to wrapped provider stream error normalization. |
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
Fixes #21979
Related #26129
Type of change
What does this PR do?
Normalizes wrapped provider stream error envelopes before generic
Errorvalues becomeUnknownError.This covers OpenAI stream payloads shaped like:
{"error":{"type":"error","sequence_number":2,"error":{"type":"service_unavailable_error","code":"server_is_overloaded","message":"Our servers are currently overloaded. Please try again later."}}}It also makes the
tasktool fail when a child assistant returns terminalinfo.errorwithout text, instead of reporting an empty successful task result to the parent.This intentionally does not add retry caps,
retry_exhausted, TUI states, fallback redesign, or OMO changes.How did you verify your code works?
bun test --timeout 30000 test/session/retry.test.ts test/tool/task.test.tsfrompackages/opencode— 50 pass, 0 failbun run typecheckfrompackages/opencodegit diff --checkbun turbo typecheck— 15 successful, 15 totalChecklist