GeezerVison is showing github.com — fix(opencode): retry raw network finish errors by opencode-agent[bot] · Pull Request #43813 · anomalyco/opencode
Conversation
Summary
- read AI SDK
finish-step.rawFinishReason directly in the existing adapter
- convert only
network_error into the existing retryable response-stream error
- leave every other finish reason unchanged
Why this shape
AI SDK already preserves the provider value on finish-step; handling it in the existing adapter avoids raw-chunk parsing and avoids adding stream middleware.
Testing
bun test test/session/llm.test.ts --test-name-pattern "network_error finish reasons"
bun test test/session/processor-effect.test.ts --test-name-pattern "retry network_error finish reasons"
bun test test/session/retry.test.ts
bun x prettier --check src/session/llm/ai-sdk.ts test/session/llm.test.ts test/session/processor-effect.test.ts
Requested by: @rekram1-node (Aiden via Slack)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
opencode-agent
Bot
changed the title
fix(opencode): isolate network finish middleware
fix(opencode): retry raw network finish errors
Aug 21, 2026
Uh oh!
There was an error while loading. Please reload this page.
1056674754
added a commit
to 1056674754/opencode
that referenced
this pull request
Aug 31, 2026
Upstream v1.18.19 (2b72179) -> v1.18.20 (7248bc1), 23 commits.
Functional changes:
- fix(opencode): surface resumable subagent errors (anomalyco#43657)
- fix(opencode): answer subagent permissions in run (anomalyco#43675)
- fix(opencode): preserve Cerebras completion limit (anomalyco#43736)
- fix(opencode): retry xAI capacity stream errors (anomalyco#43640)
- fix(opencode): retry network error variants (anomalyco#43806)
- fix(opencode): retry raw network finish errors (anomalyco#43813)
- fix(opencode): surface subagent tool errors (anomalyco#43821)
- test(opencode): remove flaky subagent test (anomalyco#43819)
- feat(go): add Ox Alpha to usage graph (anomalyco#43809); docs + i18n updates
Conflicts resolved: 29 package.json version bumps (rebranded 1.18.20-sscity),
bun.lock (took upstream, rebranded workspace entries via bun install).
session/llm/ai-sdk.ts finish-step reconciled by hand: upstream
rawFinishReason network_error check runs first (provider-declared failure,
specific message), then the fork empty-finish retry heuristic inside the
generator; duplicate ProviderError import from both sides deduplicated.
retry.ts auto-merged: upstream network[-_\s]error and at-capacity patterns
adopted; fork content-policy maxAttempts cap and 5xx-always-retryable logic
untouched. task.ts, cerebras.ts, plugin/index.ts, and run.ts auto-merged
cleanly: upstream resumable subagent task_id error surfacing, subagent
permission session tracking, and Cerebras maxOutputTokens guard adopted
alongside. Tests from both sides kept: upstream network_error finish-reason
processor/llm tests plus fork overload-retry, empty-stream, content-policy,
and single-flight regressions all pass.
rldona
pushed a commit
to plazoleta-dev/FlupCode
that referenced
this pull request
Sep 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.