Skip to content

fix(session): recover interrupted V4 model streams safely - #175

Merged
sarath-menon merged 2 commits into
mainfrom
transport-recovery
Oct 7, 2026
Merged

sarath-menon merged 2 commits into
mainfrom
transport-recovery

Conversation

@sarath-menon

@sarath-menon sarath-menon commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Interrupted V4 model streams were treated as terminal failures even when retrying was safe. This recognizes transport-error envelopes, limits recovery to three total attempts, preserves completed output and stops retries once a tool call is observed or execution begins. The unchanged real-SDK regression went from five failures on baseline to seven passing cases, and package and pre-push typechecks passed (regression evidence). Cloud PR 6394 is merged, and its GitHub staging workflow deployed this release to worker 293. The post-merge live run passed binary verification, screenshots, shell execution, JSON output, cleanup and the complete health gate (run logs). The live run verifies deployed compatibility; upstream connection failures remain unexplained.

Recognize gateway transport failures and cap retries before tool execution, preserving earlier parts. The focused SDK regression fails on main and passes with recovery, exhaustion, action and cancellation guards.
@sarath-menon
sarath-menon marked this pull request as ready for review October 7, 2026 13:23

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread AGENTS.md Outdated
Comment thread packages/opencode/src/session/retry.ts
Comment thread packages/opencode/test/session/processor-effect.test.ts Outdated
@sarath-menon
sarath-menon merged commit 5140cef into main Oct 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant