Description
An interrupted tool call can remain rendered as Preparing write... after the assistant step and subsequent response have completed.
Observed in session ses_0cce8f001ffeJMBMk6hIBAIH3e on the V2/next channel. The durable event log contained session.tool.failed followed by session.step.failed, and the message API returned the write as status: error, but the TUI retained a local status: pending copy.
Expected behavior
Once a tool or its assistant step reaches a terminal state, the TUI must not continue presenting the tool as active or preparing. Reloading or refreshing session messages should converge to the durable server projection without regressing newer in-flight state.
Reproduction shape
- Start a write tool call.
- Interrupt it while tool input is being prepared.
- Continue the session and allow the next assistant response to complete.
- Observe the interrupted write still showing
Preparing write....
Investigation
The server projection was correct. The TUI message refresh merge preferred any same-ID local non-user message over the fetched server projection, including stale completed assistant messages with orphaned pending tool parts.
Related PR: #35453
Description
An interrupted tool call can remain rendered as
Preparing write...after the assistant step and subsequent response have completed.Observed in session
ses_0cce8f001ffeJMBMk6hIBAIH3eon the V2/next channel. The durable event log containedsession.tool.failedfollowed bysession.step.failed, and the message API returned the write asstatus: error, but the TUI retained a localstatus: pendingcopy.Expected behavior
Once a tool or its assistant step reaches a terminal state, the TUI must not continue presenting the tool as active or preparing. Reloading or refreshing session messages should converge to the durable server projection without regressing newer in-flight state.
Reproduction shape
Preparing write....Investigation
The server projection was correct. The TUI message refresh merge preferred any same-ID local non-user message over the fetched server projection, including stale completed assistant messages with orphaned pending tool parts.
Related PR: #35453