[Bug]: Switching device surface can leave a completed turn stuck in "receiving parameters"
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先,跟踪 local/peer surface switch 附近的 Agentic event listener 注册过程,以及 settled-turn snapshot reconciliation path。将 in-memory tool-card projection 与报告中描述的 persisted turn state 进行比较。当 authoritative turn 和 tool calls 完成后,切回或接收到 settled snapshot 能清除任何 streaming/preparing tool card,即表示完成;使用 reproduction sequence 进行验证。
由索引模型根据 Issue 内容生成。
描述
Summary
Switching the active device surface while a turn is running can leave the original desktop UI with contradictory state after the host finishes:
- the session/sidebar indicates that the turn completed;
- the persisted turn and backend state are terminal (
completed/Idle); - an earlier
Edittool card remains stuck atreceiving parameters; - there is no effective Stop action because the backend has already removed the cancellation token.
This appears to be a device-surface event projection/reconciliation issue rather than a runtime deadlock. The settled persisted turn does not fully replace the stale in-memory tool-card projection after returning to the local surface.
Expected: After switching back, or after receiving a settled-turn snapshot, the UI should reconcile every tool item to the host's authoritative persisted state. A completed turn should not retain a streaming/preparing card.
Actual: The sidebar and session metadata show completion while one tool card continues to look active indefinitely. Restarting the desktop app restores a consistent view.
Area
Desktop app / Web UI (peer device surface switching and settled-turn reconciliation)
Reproduction or evidence
A likely reproduction sequence is:
- Start a long-running local turn containing several tool calls, including an
Edittool. - While an Edit card is still receiving/streaming its arguments, manually switch control to a peer device surface.
- Allow the original host to finish the turn.
- Switch control back to the local device and reopen the session.
- Observe that the session is marked complete but the earlier Edit card still says
receiving parameters, with no meaningful way to stop it.
Evidence from one occurrence (timestamps are local):
09:32:40: the local window became visible and the same turn was attached/projected.09:32:45: the Agentic event listener was stopped and then registered again.09:32:46:Device surface switchedfrom local (null) to a peer device (reason: manual).09:34:18: the host received the final response, completed the turn loop withreason=complete, emittedDialogTurnCompleted, cleaned the cancellation token, and transitioned the backend session toIdle.10:43:53: the surface switched back from the peer device to local.- Subsequent snapshot reconciliation reported backend state
Idleand the correct latest turn ID, but the old Edit card remained visually stuck inreceiving parameters.
Persisted data for the affected turn confirms:
- turn status:
completed; - finish reason:
complete; hasFinalResponse: true;- all 19 model rounds are completed;
- all 21 tool calls are completed;
- the exact Edit tool shown as streaming in the UI has a persisted successful result.
A process sample taken while the UI was stuck showed the normal AppKit/CoreFoundation event loop and no mutex/thread deadlock. There were no child tool processes still running.
There were also repeated get_operation_diff: Session not found / get_operation_summary: Operation not found warnings for file-operation cards that modified a file outside the active workspace. These may make the stale card more visible, but the host turn itself completed successfully and they may be a separate degradation issue.
Environment, if relevant
- OpenBitFun:
1.0.0 - Build commit:
a0d6a6fe53e0d86fa81d61390cf6f661e8a55307 - Build date:
2026-09-15T09:04:07.335Z - OS: macOS 27.0 (
26A428) - App mode: native desktop app, local workspace with peer device surface switching
- Model shown in the affected session: GLM 5.3 (the issue appears independent of provider/model)
- 主要语言
- Rust
- 星标
- 2.3k
- 派生
- 236
- 平均合并
- 3 小时 47 分钟
- 30 天内合并 PR
- 308
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GCWing/OpenBitFun 的其他 Issue
-
难度 2/5 半天 新手友好度 74/100
GCWing/OpenBitFun#3279 ·
维护者通常 1 天内回复
-
[Bug]: 界面写“敏感诊断信息默认关闭”,但后端配置当前实际默认是 true可能已有人在做 @xiechimon 于 18 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
GCWing/OpenBitFun#3213 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
GCWing/OpenBitFun#2363 ·
维护者通常 1 天内回复
-
question
难度 1/5 1 小时以内 新手友好度 78/100
GCWing/OpenBitFun#2340 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 40/100
GCWing/OpenBitFun#3346 ·
维护者通常 1 天内回复
查看 GCWing/OpenBitFun 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
swc-project/swc#12516 ·
维护者通常 1 天内回复
-
app bug
难度 2/5 1-3 小时 新手友好度 76/100
-
mls-rs-crypto-awslc: exact aws-lc-rs =1.16.3 pin blocks rustls security update可能已有人在做 @muscariello 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
-
[work-item] adam-adae-worsening-emergence: conform spec.yaml to the specification style contract (REQ-1280)可能已有人在做 @muse-yamaa-bot 今天认领。 未关闭work-item
难度 1/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复