You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2026-08-14T19:45:17.852][SessionStateMachine] State transition
{"sessionId":"452ffb66-...","fromState":"idle","event":"start","toState":"processing",
"payload":{"taskId":"452ffb66-...","dialogTurnId":"dialog_1786706585658_k00koobra"}}
Summary
本地会话的一个 turn 以
AskUserQuestion工具调用结束、正在等待用户选择时,用户切换到其他会话(我这里切到了远程中继 remote workspace 的会话),之后再切回该会话,UI 永远显示 processing 状态、输入被锁死(假死)。而后端runtime_state实际是Idle,没有任何任务在跑,也没有任何超时/恢复机制能解开。期望行为:切回会话时应恢复"等待用户回答 AskUserQuestion"的交互状态(或至少将未完成 turn 标记为可继续),输入框保持可用。
根因分析(基于日志与落盘数据)
status = "inprogress",最后一个 modelRoundstatus = "streaming"。发出 AskUserQuestion 的那一轮 model response(19:26:59.768)没有写入 turn 文件(turn 文件最后写入时间 19:25,早于该响应)。~/.bitfun/projects/<project>/sessions/452ffb66-b04d-4efc-b803-408c9f55c575/turns/turn-0001.json→"status": "inprogress",modelRounds[last].status = "streaming"state.json为"runtime_state": "Idle"。对话数据本身完好(turn-0000 / turn-0001 均完整落盘),重启后可以继续,所以这是状态恢复问题而不是数据丢失。
时间线(日志证据,2026-08-14)
Dialog turn started: dialog_1786706585658_k00koobraai::model_response收到完整响应:tool_calls=AskUserQuestion(stream 正常done_marker_received)。turn 进入等待用户输入状态,此后该 turn 再无任何持久化,也永远没有Dialog turn completedswitch_activated_after_hydrate→idle → processing(恢复旧 turnId),后端无任务对应,UI 假死复现步骤(推测,基于观察到的证据)
修复建议
Environment
452ffb66-b04d-4efc-b803-408c9f55c575(本地 workspace)