Skip to content

tui: interrupted tool can remain stuck in preparing state #35454

Description

@kitlangton

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

  1. Start a write tool call.
  2. Interrupt it while tool input is being prepared.
  3. Continue the session and allow the next assistant response to complete.
  4. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions