[Bug] 切换会话/工作区时 manage_dialog_queue 返回 "Session is not loaded on the execution host"

未关闭
#3,729 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Raing5Days 已经在做这个了。

开始于 2026年11月4日。

  • #3734 来自 @Raing5Days —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust
领域
backend, desktop

调研方向

Start by reading the session-switch and workspace event logs in the issue, then trace the manage_dialog_queue request and session loading on the execution host. The issue also points to workspace loading/error events and the remote compatibility service path, but names no source files or tests. Done means session switches no longer produce these failures or contradictory workspace events; an open linked pull request (#3734) indicates work is already underway.

由索引模型根据 Issue 内容生成。

描述

关联:#3728(同批次排查中的渲染进程卡顿)、#3275(同为 SSH 工作区与本地工作区共存时的消息发送失败,已修复的相邻问题)

环境

  • OpenBitFun 1.0.8(com.openbitfun.desktop)
  • macOS(Apple Silicon)
  • 工作区同时存在本地会话与远程 SSH 工作区会话

问题描述

在会话之间切换(尤其是本地工作区 ↔ 远程 SSH 工作区来回切)时,前端 manage_dialog_queue 请求持续失败:

[TauriAdapter] Request failed
{"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}

1 分 16 秒内连续失败 7 次(16:58:01 → 16:59:17)。每次失败都紧跟在 [AuxPane] Active session changed 之后,说明触发点是会话切换。

关联现象

同一时刻 WorkspaceManager 在 0 ms 内连续发出两个相反事件:

16:58:22.403  [WorkspaceManager] Emitting event {"type":"workspace:loading"}
16:58:22.403  [WorkspaceManager] Emitting event {"type":"workspace:error"}

以及远程工作区的兼容服务不可用:

{"action":"get_external_source_control_snapshot",
 "error":{"code":"host_unavailable",
          "detail":"The remote workspace is not running the external compatibility service",
          "retryable":true}}
[ChatInput] External prompt commands are unavailable on this host {"code":"host_unavailable"}

复现步骤

  1. 打开一个本地工作区会话并保持激活。
  2. 切换到远程 SSH 工作区的会话(本例为通过 SSH 连接的远端主机)。
  3. 再切回本地会话,或切到另一个会话。
  4. 观察控制台:manage_dialog_queue 返回 Session is not loaded on the execution host。

本机已有远程连接处于 is_connected=true(后端日志 ssh_is_connected 确认),因此不是 SSH 掉线导致。

实际影响

  • 每次切换都会在前端抛一个未处理的失败请求,workspace:loading 后立即 workspace:error,工作区状态机进入错误分支。
  • 怀疑这与同时段输入框的交互异常相关(切换后输入框短暂不可用)。

完整日志(已脱敏)

evidence-B-dialog-queue-errors.log
# 来源: webview.log  时间: 2026-11-04 16:57~17:01 (UTC+8)
# 每次切换会话/工作区,manage_dialog_queue 均返回
# "Session is not loaded on the execution host"

# 证据 B:manage_dialog_queue 调用失败(已脱敏)
# 来源: webview.log  时间: 2026-11-04 16:57~17:01 (UTC+8)
# 判读要点: 每次切换会话/工作区,前端调用 manage_dialog_queue 均收到
#   "Session is not loaded on the execution host";WorkspaceManager 在同一毫秒内
#   连续发出 workspace:loading 与 workspace:error(相隔 0ms)。

[2026-11-04T16:58:01.255][tid:1][DEBUG][webview] [AuxPane] Active session changed, swapping agent canvas snapshot {"from":"edac7bb9-cfdd-4bb0-8e64-db2bbc8131f4","to":"149ac9af-bca4-4d4a-a788-b38d03fa4746"}
[2026-11-04T16:58:01.454][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}
[2026-11-04T16:58:03.304][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}
[2026-11-04T16:58:22.332][tid:1][DEBUG][webview] [AuxPane] Active session changed, swapping agent canvas snapshot {"from":"149ac9af-bca4-4d4a-a788-b38d03fa4746","to":"deb8d08b-b259-4045-8d7b-68ff814d1659"}
[2026-11-04T16:58:22.403][tid:1][DEBUG][webview] [WorkspaceManager] Emitting event {"type":"workspace:error"}
[2026-11-04T16:58:22.407][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}
[2026-11-04T16:58:32.438][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}
[2026-11-04T16:58:37.764][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}
[2026-11-04T16:58:47.766][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}
[2026-11-04T16:58:59.941][tid:1][DEBUG][webview] [WorkspaceManager] Emitting event {"type":"workspace:error"}
[2026-11-04T16:59:00.088][tid:1][DEBUG][webview] [HistorySessionDiagnostics] Historical session diagnostic event {"diagnosticId":"149ac9af-189149417-156","sessionId":"149ac9af-bca4-4d4a-a788-b38d03fa4746","event":"switch_requested","ageMs":0,"switchRequestId":942,"isRemoteSession":false,"isHistorica…
[2026-11-04T16:59:00.096][tid:1][DEBUG][webview] [AuxPane] Active session changed, swapping agent canvas snapshot {"from":"deb8d08b-b259-4045-8d7b-68ff814d1659","to":"149ac9af-bca4-4d4a-a788-b38d03fa4746"}
[2026-11-04T16:59:16.929][tid:1][DEBUG][webview] [AuxPane] Active session changed, swapping agent canvas snapshot {"from":"149ac9af-bca4-4d4a-a788-b38d03fa4746","to":"c4d7307b-fb01-487c-8059-2d14b29e375c"}
[2026-11-04T16:59:17.029][tid:1][ERROR][webview] [TauriAdapter] Request failed {"action":"manage_dialog_queue","error":"Session is not loaded on the execution host"}

期望行为

  • 会话尚未在目标执行宿主加载时,应将队列管理请求降级为 no-op 或可重试状态,而不是抛错误。
  • workspace:loading 与 workspace:error 不应在同一毫秒内连续发出,状态机需要去重/防抖。
  • 远程工作区缺少 external compatibility service 时,ChatInput 应静默跳过,而非走错误路径。
主要语言
Rust
星标
2.3k
派生
236
平均合并
13 小时 23 分钟
30 天内合并 PR
335

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GCWing/OpenBitFun 的其他 Issue

查看 GCWing/OpenBitFun 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。