Skip to content

[Bug] Terminal stream failure notice appears attached to reasoning output #943

@Astro-Han

Description

@Astro-Han

What happened?

When a Xiaomi mimo-v2.5-pro session hits a terminal stream failure, the stored session data keeps the failure as a separate notice part (type: \"notice\", kind: \"safe_retry_failed\"), but the rendered conversation makes the failure/close notice look visually attached to the preceding reasoning block.

This makes it appear as if the model wrote the connection/close error inside its thinking output, even though the exported data shows the notice is a separate part. The problem is a presentation bug around assistant part grouping / turn-level failure rendering rather than a malformed session export.

Which area seems affected?

UI or design system; Model harness, prompts, tools, or session mechanics

How much does this affect you?

Makes a workflow harder, but there is a workaround

Steps to reproduce

  1. Use PawWork with provider xiaomi-token-plan-cn and model mimo-v2.5-pro.
  2. Run a session that performs tool calls and then encounters a stream failure before provider progress, or receives an upstream gateway failure.
  3. Observe the conversation after the failure notice is written.
  4. The failure/close notice appears visually grouped with, or attached to, the preceding reasoning output.

Observed from session export:

  • App version: 0.0.0-prod-202605261611
  • Provider/model: xiaomi-token-plan-cn/mimo-v2.5-pro
  • Export file inspected locally: pawwork-session-nimble-wolf-2026-05-27-04-39-54.json
  • Failure traces include:
    • LLM stream connection timed out after 120000ms without provider progress
    • 502 Bad Gateway from openresty
  • Stored failed turns have a separate notice part:
    • type: \"notice\"
    • kind: \"safe_retry_failed\"

What did you expect to happen?

Terminal stream failure / safe-retry-failed notices should render separately from reasoning output, ideally as a turn-level notice or error/status card. The UI should not make local close, watchdog, or provider stream errors look like model thinking content.

PawWork version

0.0.0-prod-202605261611

OS version

macOS 25.5.0

Can you reproduce it again?

Sometimes

Diagnostics

The exported session indicates the data model is already separated correctly:

  • Successful reasoning/tool turns store type: \"reasoning\" and type: \"tool\" parts.
  • Failed retry turns store only type: \"notice\", kind: \"safe_retry_failed\".
  • No MessageAbortedError, local lifecycle close, or close text was found inside the reasoning parts in the inspected export.

Likely code areas to inspect:

  • packages/ui/src/components/message-part/assistant-parts.tsx
  • packages/ui/src/components/message-part/grouping.ts
  • packages/ui/src/components/message-part/parts/notice.tsx
  • packages/ui/src/components/session-turn.tsx

A small fix may be to route terminal notices such as safe_retry_failed out of the normal assistant parts stream, or add a clearer visual boundary so they cannot appear as part of the preceding reasoning block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't workingharnessModel harness, prompts, tool descriptions, and session mechanicsuiDesign system and user interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions