You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Targets v2 per CONTRIBUTING.md. The issue-link warning is the existing workflow problem described in #43964.
Type of change
Bug fix
New feature
Refactor / code improvement
Documentation
What does this PR do?
Mini's session wait can outlive Bun's default fetch idle timeout and terminate with ClientError: Transport. Use the same timeout policy as run for initial and reconnected clients. Explicit cancellation still works, and the prompt is never resubmitted.
How did you verify your code works?
The subprocess regression passes and fails with unchanged mini code. A delayed local server proves default fetch times out while initial and reconnected mini clients keep waiting; caller cancellation still rejects.
A consumer probe with the real SDK and session transport completes both delayed turns, renders their responses, and submits each prompt once.
All 1,362 TUI tests pass, with two skips. Repository lint and all 35 package typechecks pass, with caching disabled.
Full CLI suite: 284 pass, nine skips, and eight ACP failures. Six failing cases also fail in a PR-free baseline; two do not reproduce in that bounded run. ACP uses a separate client and does not reach the changed mini constructor.
Thanks @andreivince — this fix is approved. I rebased the branch onto current dev and dropped the two Merge branch 'v2' commits, so the history is now just your commit (authorship kept) plus one small follow-up commit.
The follow-up only touches the test. It no longer requires stderr to be completely empty. Instead it checks that stderr has no Transport: The operation timed out or TimeoutError, and it still checks the exit code and stdout, so unrelated runtime warnings won't make it flaky. I confirmed the test still fails without the timeout: false change. We'll merge once CI is green.
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
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 #50135
Targets
v2per CONTRIBUTING.md. The issue-link warning is the existing workflow problem described in #43964.Type of change
What does this PR do?
Mini's session wait can outlive Bun's default fetch idle timeout and terminate with
ClientError: Transport. Use the same timeout policy asrunfor initial and reconnected clients. Explicit cancellation still works, and the prompt is never resubmitted.How did you verify your code works?
Screenshots / recordings
No visual change.
Checklist