🤖 fix: stop treating slow stream starts as interruptions#2898
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
f599d69 to
b890955
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8909553e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b890955 to
d41969c
Compare
|
@codex review |
d41969c to
f70be97
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
f70be97 to
9039bf9
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9039bf9a52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9039bf9 to
fb66b89
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
fb66b89 to
de02601
Compare
|
@codex review |
de02601 to
9f3d01d
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f3d01d436
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9f3d01d to
b465c2b
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b465c2b6ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b465c2b to
29464ed
Compare
|
@codex review |
29464ed to
fe47263
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
fe47263 to
696db30
Compare
|
@codex review Simplified the lifecycle/retry patch down to roughly 500 changed lines and reran |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
696db30 to
8a61a13
Compare
|
@codex review Follow-up fix: RetryBarrier now stays mounted via a |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a61a132b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8a61a13 to
d618f83
Compare
|
@codex review Addressed the stale hidden RetryBarrier state by clearing manual retry errors whenever the mounted-but-hidden barrier is suppressed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d618f8328b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add a backend-owned stream lifecycle so the renderer can keep PREPARING turns in-progress, rehydrate that state on reconnect, and reserve interruption UI for explicit abort/failure cases. This follow-up also keeps manual-retry rollback state alive while resumed attempts are in flight, previews replay lifecycle state before caught-up, and replays terminal stream errors so reconnects preserve failure-specific UI instead of degrading to generic interruption banners. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$75.16`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=75.16 -->
d618f83 to
1c5cb9f
Compare
|
@codex review Addressed the append-replay churn by making repeated pre-stream |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Introduce a backend-owned stream lifecycle so slow-starting turns stay in-progress instead of being inferred as interrupted from a renderer-side timer or trailing-user transcript shape.
Background
The current retry/interruption UI treated a long PREPARING window as a likely interruption after the client-side grace period elapsed. That made legitimate slow starts and reconnects look broken even while the backend was still working on the same turn.
Implementation
stream-lifecycleevent/snapshot that modelspreparing,streaming,completing,interrupted, andfailedAgentSession, including replay-time hydration beforecaught-upcaught-upand replay terminalstream-errorstate so reconnects preserve failure-specific UI instead of regressing to generic interruption bannersValidation
bun test src/browser/features/Messages/ChatBarrier/RetryBarrier.test.tsx src/browser/stores/WorkspaceStore.test.ts src/browser/utils/messages/StreamingMessageAggregator.runtimeStatus.test.ts src/node/services/agentSession.preStreamError.test.tsxvfb-run -a env PLAYWRIGHT_ARGS="tests/e2e/scenarios/streamingBehavior.spec.ts -g 'app recovers after error'" make test-e2emake static-checkRisks
This touches the stream lifecycle path across backend replay, retry eligibility, and barrier rendering, so regressions would most likely show up in reconnect state restoration or interrupt/retry UI. The change is contained by making the lifecycle a derived view over existing backend state, replaying failure-specific terminal state explicitly, and adding regressions around replay previews plus manual retry cleanup.
Generated with
mux• Model:openai:gpt-5.4• Thinking:xhigh• Cost:$75.16