Repository navigation
Description
Summary
After interrupting a Turn, starting a replacement Turn, and steering that replacement while it is running, Desktop can remain visually stuck without showing the final assistant response even though Runtime Host has completed the invocation and both canonical events and the durable transcript contain the response.
This is a renderer reconciliation/subscription failure, not a provider, Runtime, or SQLite write failure. Switching away and back or reloading can recover the already-persisted message.
Reproduction observed on Maka Dev
- Open a Desktop Session and send a prompt.
- Interrupt the running Turn.
- Send a replacement prompt in the same Session.
- While the replacement is running, send a steering message.
- Let the replacement Run finish.
- Observe that the current conversation may not display the final assistant message.
The observed sequence was:
16:49:01 Run A starts: “画个图来讲解下吧”
16:49:05 Run A -> cancelled, abortSource=user_stop
16:49:12 Run B starts: “交互式html方式”
16:51:30 steering accepted by Run B: “交互式html形式吧”
16:51:46 final assistant text committed
16:51:47 Run B -> completed, stopReason=end_turn
Durable evidence
For Session a5d5ad9e-ef72-47b4-a9ac-5bf22191fede:
- Run A is terminal
cancelledwithabortSource=user_stop; - Run B is terminal
completed; runtime_eventscontains the complete finaltextevent followed bycompleted/end_turn;session_messagescontains the same final response as anassistantrecord, followed byturn_state(status=completed, partialOutputRetained=true);- Session metadata is
active, notrunningorwaiting_for_user; - no tool, interaction, permission request, or provider invocation remains pending;
lastReadMessageIdadvanced to the provider event identity for the final response.
The final response therefore crossed the Runtime and storage boundaries successfully but was absent from the visible current transcript.
Expected behavior
After an interrupted Turn is replaced, the active conversation must reconcile against the durable transcript through the replacement Run's terminal event. Steering must not leave the current renderer projection unable to display the final assistant response.
If the live event subscription misses or races a terminal update, the terminal session/catalog refresh should hydrate and display the durable assistant message without requiring a conversation switch or reload.
Suggested investigation boundary
Inspect the interaction between:
- active-only
sessions.subscribeEventslifecycle; - interruption followed immediately by a new Turn;
- steering inside that replacement Run;
LiveTurnProjectionreconciliation withsession_messagesaftercompleted;- terminal refresh/probe logic once Session status is no longer expected to stream.
The regression test should use the exact lifecycle:
running A -> user_stop -> cancelled A
-> start B -> steer B -> final assistant text -> completed B
and assert, without remounting, that the final durable assistant response becomes visible and the Stop/streaming presentation clears.
Relationship to existing issues
Related to #3044 and the streaming-remount coverage, but distinct:
- fix(ui): returning to a live conversation intermittently re-streams accumulated output — regression from #2975, flaking CI #3044: accumulated output is replayed progressively when returning to a live conversation;
- this issue: the final response of the currently displayed replacement Run can remain hidden after interrupt + steering, despite being fully committed.
简体中文
概要
中断一个 Turn 后,在同一 Session 启动替代 Turn,并在替代 Turn 运行期间发送 steering,Desktop 可能一直不显示最终 assistant 回复;但 Runtime Host 已完成 invocation,规范事件流和持久化 transcript 中也都已经存在完整回复。
这是 renderer reconciliation/订阅问题,不是模型 Provider、Runtime 或 SQLite 写入失败。切换到其他会话再返回,或刷新页面,可以恢复已经持久化的消息。
Maka Dev 中观察到的复现过程
- 打开 Desktop Session 并发送 prompt。
- 中断正在运行的 Turn。
- 在同一 Session 发送替代 prompt。
- 替代 Turn 运行时再发送一条 steering。
- 等待替代 Run 完成。
- 当前会话可能仍不显示最终 assistant 消息。
实际时间线:
16:49:01 Run A 开始:“画个图来讲解下吧”
16:49:05 Run A -> cancelled,abortSource=user_stop
16:49:12 Run B 开始:“交互式html方式”
16:51:30 Run B 接收 steering:“交互式html形式吧”
16:51:46 最终 assistant 文本写入
16:51:47 Run B -> completed,stopReason=end_turn
持久化证据
Session a5d5ad9e-ef72-47b4-a9ac-5bf22191fede 中:
- Run A 已终止为
cancelled,abortSource=user_stop; - Run B 已终止为
completed; runtime_events包含完整最终text,随后是completed/end_turn;session_messages包含相同的最终assistant记录,随后是turn_state(status=completed, partialOutputRetained=true);- Session metadata 为
active,不是running或waiting_for_user; - 没有遗留工具、interaction、权限请求或 Provider invocation;
lastReadMessageId已推进到最终回复对应的 Provider event identity。
因此,最终回复已经正确通过 Runtime 和存储边界,但没有出现在当前可见 transcript 中。
预期行为
中断 Turn 并启动替代 Turn 后,当前会话必须在替代 Run 的终止事件到达时与持久化 transcript 完成对齐。Steering 不应导致 renderer projection 无法展示最终 assistant 回复。
如果 live event subscription 错过终止更新或发生竞争,terminal session/catalog refresh 也应自动加载并展示持久消息,无需切换会话或刷新。
建议调查边界
重点检查以下机制的交互:
- active-only
sessions.subscribeEvents生命周期; - 中断后立即启动新 Turn;
- 替代 Run 内的 steering;
completed后LiveTurnProjection与session_messages的 reconciliation;- Session 不再处于 streaming 状态后,terminal refresh/probe 是否仍能补齐消息。
回归测试应覆盖完整序列:
running A -> user_stop -> cancelled A
-> start B -> steer B -> final assistant text -> completed B
并在不 remount 的情况下断言:最终持久化 assistant 回复可见,Stop/streaming UI 正确清除。
与已有 Issue 的关系
与 #3044 及 streaming-remount 覆盖相关,但不是同一问题:
- fix(ui): returning to a live conversation intermittently re-streams accumulated output — regression from #2975, flaking CI #3044:返回 live conversation 时,积累输出被逐字重新播放;
- 本 Issue:interrupt + steering 后,当前正在显示的替代 Run 最终回复可能完全隐藏,即使它已经完整持久化。
Activity
liugddx commentedon Aug 15, 2026
Additional reproduction evidence narrows this further: the final response is initially visible through the live projection, then disappears after switching to another conversation and back.
For the same Session, a later Turn reproduced the remount failure independently:
The missing response remains durable:
runtime_events: finaltextat event sequence 7, followed bycompletedat sequence 9;session_messages: finalassistantat durable sequence 185, followed byturn_state(completed)at 187 andsession_resumeat 188;lastReadMessageIdequals the final assistant message id (3dda08de-2db4-483f-96b4-78b2dc91add6), which is additional evidence that the renderer observed the response before the remount;activeand the Run is terminalcompleted.This rules out a missing terminal event and makes the failure boundary more specific:
Please include a second regression assertion in addition to the no-remount lifecycle test: after the final response becomes visible, switch conversations and return, then assert that the same durable assistant message is still rendered. The investigation should now include
DesktopTranscriptRangeStore, transcript tail bootstrap/range replacement, and durable/live reconciliation during active-session remount.简体中文
新增复现证据进一步缩小了范围:最终回复最初可以通过 live projection 正常显示,但切换到另一个会话再返回后会消失。
同一个 Session 的后续 Turn 独立复现了 remount 问题:
消失的回复仍然完整持久化:
runtime_events:event sequence 7 是最终text,sequence 9 是completed;session_messages:durable sequence 185 是最终assistant,187 是turn_state(completed),188 是session_resume;lastReadMessageId等于最终 assistant message id(3dda08de-2db4-483f-96b4-78b2dc91add6),进一步证明 renderer 在 remount 前确实看到过该回复;active,Run 已终止为completed。这排除了 terminal event 缺失,并将故障边界收敛为:
除原本“不 remount”的生命周期测试外,请再增加一条回归断言:最终回复可见后切换会话再返回,断言同一条持久 assistant 消息仍然显示。调查范围应进一步覆盖
DesktopTranscriptRangeStore、transcript tail bootstrap/range replacement,以及 active-session remount 时 durable/live reconciliation。