Skip to content

fix(cli): keep mini session waits alive - #50248

Merged
thdxr merged 2 commits into
anomalyco:devfrom
andreivince:mini-wait
Oct 19, 2026
Merged

thdxr merged 2 commits into
anomalyco:devfrom
andreivince:mini-wait

Conversation

@andreivince

@andreivince andreivince commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Fixes #50135

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.

Screenshots / recordings

No visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Copilot AI lite review requested due to automatic review settings September 20, 2026 23:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:12
@thdxr

thdxr commented Oct 19, 2026

Copy link
Copy Markdown
Member

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.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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.

mini: session.wait timeout exits with ClientError: Transport after follow-up messages during long-running tasks (v2.0.10)

3 participants