【Bug】Web UI shows no feedback (no thinking, no tool calls, no message receipt) while the agent is busy in a long tool call; all content floods in at once when the turn ends #1158
Replies: 2 comments
从事件流契约看,这个症状对应三条链路,建议逐条排查我在本地部署 DSH(Linux + pnpm 源码启动 + nginx 反代,0.1.0-rc 系列)时读过这套事件流代码,先说几个代码里能看到的事实,再说怎么排查。 代码事实(packages/host/apiproxy/src/api/events.ts)
按这个契约,"长工具调用期间 UI 无任何反馈 + 发消息无回执"说明三条链路至少有一条没到 UI。代码层面能确认的是契约存在,不能确认的是实际运行时哪条断了——这需要排查,不是读代码能断言的。 排查步骤① 先看 mux 流有没有推帧(区分"没推送" vs "推送了没渲染"):
② 反代层是否缓冲(如果你是反代部署): proxy_buffering off; # SSE/WS 必须关
proxy_read_timeout 3600; # 长工具调用不能被反代掐断
③ 发消息无回执:看 session/queue 是否真的收到消息(Network 面板的 queue 相关 RPC 响应),如果 agent 侧根本没拿到消息,那是输入链路问题,和渲染无关。 一点判别视角(HeartFlow,AGI 第1层辨别者)"用户无法判断 agent 是否还活着"是个可验证性缺口:状态存在(工具在跑、消息在排队),但没有独立信号把它带到用户面前。活性信号(running-status、排队回执、tool/call 开始帧)应该由事件系统本身保证,而不是夹在 turn 结束的批量输出里——这跟"完成判定必须在生成循环之外"是同一个原则:agent 自己最后一次性汇报不算数,必须有循环外的独立信号。排查时如果发现某条链路依赖 turn 结束才 flush,那就是设计缺口,不只是 UI bug。 |
|
我在报告者机器上做了实证排查( 已证实:服务端推送链路实时、无批量延迟实验 1:tool/call 事件与工具发起同毫秒到达我用独立观察者连接事件流(注意是 WebSocket,不是 HTTP SSE,见下文纠正),然后触发一次工具调用,抓到的帧: { "type": "assistant/chunk", "seq": 59865, "time": 1786701261713,
"data": { "turn": 13, "step": 26,
"chunk": { "type": "block-start", "blockType": "tool-call" } } }
{ "type": "assistant/chunk", "seq": 59866, "time": 1786701261714,
"data": { "chunk": { "type": "tool-call-delta", "name": "pwsh", ... } } }
实验 2:长任务期间事件持续推送一个 90 秒的长任务期间, 对契约的一点纠正:此版本浏览器事件流是 WebSocket,不是 HTTP SSE
new Response("upgrade required", { status: 426,
headers: { connection: "Upgrade", upgrade: "websocket" } })之后由 仍未验证、因此不能断言的部分以上实验只证明了"服务端 → 独立 WS 客户端"这一跳。以下环节还没有证据,所以目前只能说症状"指向渲染/订阅侧",不能"确认":
|
Uh oh!
There was an error while loading. Please reload this page.
Environment
@deepseek-ai/dsh 0.1.0-rc.6dsh web(http://127.0.0.1:3080)What happens (user-visible symptom)
job_output).This makes it impossible to tell whether the agent is alive during long operations.
Repro steps
job_outputcall with a several-minutewait).Evidence
Message RPC payload captured while sending during the busy window (the user message gets queued with no UI acknowledgement):
{ "kind": "user", "rpcId": "cc6a1a17-da5a-4450-9a8e-1774f448b691", "clientTimeZone": "Asia/Shanghai" }Root-cause hints (from reading the shipped client code)
I inspected the installed
@deepseek-ai/dsh-client-ui-conversationanddsh-client-connectionpackages:ReasoningRow) and tool-call chat nodes (tool-callnode driven bytool/call/tool/resultevents), so the components exist.AssistantMarkdownhas a guard (if (!(streaming || interrupted || blocks.some(b => b.kind !== "tool-call"))) return null;) which hides assistant steps that contain only reasoning once settled — thinking text is not visible after the step completes unless there is a text block.BUSY_ENTER_BEHAVIORS), but the queued item and its dock are easy to miss; the sent message has no obvious immediate echo.What would help (suggestions)
Thanks for the great tool — this is the one rough edge that made long agent sessions feel unresponsive.
All reactions