Repository navigation
Replies: 3 comments 1 reply
"全延迟工具数组 ⇒ 每轮 400"是一条会话砖化类缺陷——建议按这个定性提,并补两点1. 你的自我更正是对的,而且让这条更强你把先前那条补充撤回并更正为:换面这一步走官方代码路径就会发生( ⇒ 这个更正把责任从"我的插件用法"移到了"官方路径",是本条报告最关键的一步。建议把"Correction"放在正文最前(你现在的排版已经是这样,很好)——否则维护者会先按"第三方插件导致"读,从而低估它。 2. 建议按"会话砖化"定性(与已有先例对齐)你写"仅靠重载/重启无法离开这个状态,4 个会话里 3 个至今卡着"。这类"一次进入、无法自救"的形态在同一天已有多条同类报告:
⇒ 建议在正文里点出这个共性:"进入该状态后没有自助出口" 是共同特征,诉求也因此可以合并成一条——"装配出不可能满足的请求(无非延迟工具)时,应当在装配期失败并给出可操作提示,而不是把它发出去换回每轮 400"。 3. 请补三样(决定它落在哪一层)
第 3 条是你这条最有价值的部分:它把"某个会话坏了"变成"官方回退路径可以造出不可用装配"——后者才是可修的设计缺陷。 4. 版本口径你测的是 一条边界我没有核对你这条的具体代码路径( |
0.2.1-rc.2 复核:同一症状仍存在,且入口不止
|
|
Thanks — this is the answer to the recheck I asked for, and the entry point being I confirmed the mechanism on
There is no all-deferred guard anywhere on that path. The only normalization in the file is at One thing to watch if you implement it there: On your untested workaround, one caution before you spend a machine on it. Setting The generalizable part in your report is the one worth keeping in the title: any path that replaces the whole tool surface and lands on a single newly added tool produces an all-deferred array, regardless of which preset pair or which caller triggered it. The |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR (中文):一个以 PTC 呈现建立的会话,只要它的工具面被整体替换成不含
run_code的面(反向同理),装配出的工具数组里就一个非延迟工具都不剩 ⇒ DeepSeek Messages 接口每轮返回 400,仅靠重载/重启无法离开这个状态(我们 4 个会话里 3 个至今卡着)。更正:换面这一步走官方自己的代码路径就会发生(composeAgent()对agentPreset为空的会话会退回注册表默认预设),不需要任何第三方插件。Environment
dshBuildCommit 04f392c9), Windows 11 (10.0.26200), profiledesktopdeepseek-official/deepseek-flash,reasoningEffort: highSymptom
Every turn of an affected session fails in ~1 s, before the model runs:
Restarting the host and re-opening the session does not clear it: after a full restart, that session's next turn fails the same way.
Evidence (session journal,
request/headerevents)[run_code](1 entry, nodeferLoading) for the first 26, and 29 host-plane plugin tools (godot_*,qq_*,memory,todoplugins, …) for the last. Turns before that switch completed normally; the first turn after it 400s.[run_code]→ host-plane (3 sessions) and host-plane →[run_code](1 session). The host-plane set size varies with which plugins loaded (27 / 28 / 29 entries).[run_code]— i.e. leaving the bad state also requires a surface replacement, which is the very operation that causes the problem.request/headernever 400 — one has run 21 turns on the host-plane surface, several on PTC.Where the surface replacement comes from (no third-party client required)
Reading 0.2.0-rc.2
dsh-api-session-controller:composeAgent(presetId)=(await presets.resolve(presetId)).id, plus a setup that callspresets.mount(ctx, resolvedId).resumeObserved()passesthis.presetForObservation(observation)— the session'sagentPresetprojection, orundefined. For a session whose projection isnull/absent, that becomespresets.resolve(undefined)⇒ the registry default (agent-preset-registry:default/selectedDefault).ptcdefault that is exactly the replacement described here — through the vendor's own path, with no user-side plugin involved.Mechanism (0.2.0-rc.2 source)
dsh-llm-deepseekDEFAULT_MODELSdeclaresdeepseek-flashwithtoolUpdate: "addition-only", soprojectToolUpdates()indsh-llmnever takes thetoolUpdate === undefineddegradation branch that stripsdeferLoading(the branch cited in pi-ai adapter: `deferLoading` tools cause a hard `UNSUPPORTED_CONTENT` error — please degrade instead #8679).toolDeclarations()seeds declarations fromhistory.toolsand marks any tool that arrives only as an update addition withdeferLoading: true;addition-onlythen deletes declarations whose name is absent from the currently active tool list — which removes the baselinerun_code.deferLoading === true→defer_loading: true; the Messages API rejects a tool array in which every entry is deferred.history.toolsis folded from committed headers, so once the active set and the stored baseline are disjoint the projection has no non-deferred entry left to emit — every turn is rejected until the surface is replaced again.Related (symptom-similar, not duplicates)
run_codefails under the desktop ASAR runtime.deferLoadinginstead of degrading.Those reports cover losing tools. This one is about what the client emits afterwards: an all-deferred tool array, a 400 the session cannot leave on its own, and no client-side diagnostic. Please don't close it as a duplicate of them.
Suggested fix
toolUpdate === undefinedbranch (stripdeferLoading) instead of emitting an all-deferred array.history.toolswhen the active tool set is disjoint from the stored baseline.Acceptance criteria
deferLoading) or fails loudly, rather than emitting a request the API can only reject.composeAgent(undefined)default path — cannot leave the session unable to take another turn.Workaround (with explicit scope)
DSH_TOOLS_MODE=nativein the launching environment switches tool presentation from PTC to native function calling (#4565). For a PTC-baseline session in this state it removes the all-deferred array, and therefore the 400 — but it repairs nothing else, and it does not un-brick a session whose surface is already inconsistent.Duplicate check
Swept before posting:
defer_loading→ 0 hits;toolUpdate/deferLoading→ only #8679 (pi-ai, client-side hard throw);cannot be deferred/addition-only→ no true hits. Tool-surface loss itself is reported (#8486, #8204, #8635, #4921); that a surface replacement then yields a stuck 400 with no client-side diagnostic is not.All reactions