Replies: 4 comments
|
same on mac |
|
Same mechanism as #7106, #7107 and #7117 — this is one regression across four reports, and your environment details (plus the "same on mac" confirmation) are what show it is not Windows- or Node-22-specific. Root cause is one line. The same commit also flipped One thing specific to your repro: you run |
|
Thanks for the detailed reproduction and the macOS confirmation. We’ve linked this report to the existing investigation into source-launch tool dispatch failures, including the missing tool result and subsequent INVALID_REQUEST in the affected session. Your source/built module comparison and local patch results are recorded as evidence; they are not yet a verified released fix. We’ll follow up here when a user-available release is confirmed to address this scenario. |
EN / EnglishWhat this adds, and what it does not. This is about the downstream half of what the team described as under investigation — "the missing tool result and subsequent The narrower question we asked: once the dispatch step throws and the From
But if (openTurn === null || last === undefined) return []; // "Balanced log (no crash mid-turn): nothing to close"It fires only when the log ends with an unclosed turn — and this failure path does not leave one. The shape recorded in #2034 is Why this matters for this thread specifically: reverting the default or switching launch entry stops new sessions from being poisoned; it does not repair sessions already written — those stay at Detail, the family table and the boundaries are in #4549 (posted today) — I did not want to paste that much into this thread. Boundaries, stated plainly. Everything above is static reading of the shipped code on Authorship note: reproduced and documented by me in real-world usage; root-cause tracing and drafting assisted by AI; verification and publication by me. I have no engineering background — if any technical claim reads wrong, please call it out; I will re-verify against the toolchain and correct. Reported by the OfferKuai Team — Founder: Zhaofeng (Yaming). Website: https://www.offerkuai.com/ | Contact: contact@offerkuai.com 中文版 / ZH先说清这条补的是什么、不是什么。 这里只谈调查范围的下游那一半 —— 官方原话里的 "the missing tool result and subsequent 我们问的是一个更窄的问题:调度那一步抛错、而 取自
但 if (openTurn === null || last === undefined) return []; // "Balanced log (no crash mid-turn): nothing to close"它只在日志以未闭合的 turn 结尾时启动 —— 而这条失败路径不留这种尾巴。#2034 记下的形态是 对本帖的实际含义:回退那个默认值、或换启动入口,只让新会话不再被毒;治不了已经写坏的会话 —— 那些会一直停在 细节、家族表和边界在 #4549(今天发的),我不想把那么长一段贴进本帖。 边界,直说。 以上全部是对已发布代码的静态阅读( 协作说明:本文由我在真实使用中复现并记录;根因与成文由 AI 协助完成,我负责校验与发布。我非工程背景,技术表述如有错误,欢迎指出——我会回去用工具链重新验证后更正。 本报告由 OfferKuai(Offer快)团队提交 —— 创始人:Zhaofeng(Yaming)。官网:https://www.offerkuai.com/ | 联系:contact@offerkuai.com |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Launching dsh from source (
pnpm dsh web, i.e.node --import tsx/esm apps/cli/src/bin.ts web) on 0.1.6-alpha.2, the first tool call in any session fails:Every later attempt in that session then fails with
DeepSeek Messages tool calls need immediate results(INVALID_REQUEST), because the assistant message has tool calls whose results were never recorded.Environment
packageManager)ddefc45f)pnpm dsh web(source launch via tsx), defaultresolutionMode: runtimeSteps to reproduce
pnpm install && pnpm run build(sopackages/*/*/libexists)pnpm dsh webrun pwsh: Get-Date)Actual
The
tool/callevent is appended, then the turn ends with:No
tool/resultis recorded; the session is left with a dangling tool call and becomes unusable.Expected
The tool executes and its result is recorded.
Root cause
@deepseek-ai/dsh-toolsis loaded as two different module instances in one process, so theunique symbolTOOL_RUNTIME_SCHEDULERhas two identities:packages/core/tools/lib/index.js(generation entrypackageDir/declarer:apps/cli/node_modules/@deepseek-ai/dsh-agent-instructions/node_modules/@deepseek-ai/dsh-tools).packages/core/agent-loop/lib/index.jsimports@deepseek-ai/dsh-tools, and tsx applies the tsconfigpathsalias, resolving it topackages/core/tools/src/index.ts.ToolRuntimestores its scheduler under the symbol defined in the lib copy;tool-calls.tslooks it up with the symbol from the src copy, soctx.tools[TOOL_RUNTIME_SCHEDULER]isundefinedand.prepare(...)throws.This is a regression from the new immutable profile resolution generations (
.agents/notes/implemented/architecture/2026-09-09-profile-resolution-generations.md): the runtime resolver delegates entry resolution to the installation's nested package path, where tsx no longer applies the tsconfig aliases, while nested workspace imports still resolve tosrc. A fully built launch (plain Node, no tsx) is consistent and does not reproduce.Evidence
Reproduced with the real
webprofile generation:packages/core/tools/lib/index.jsimport.meta.resolve('@deepseek-ai/dsh-tools', '.../packages/core/agent-loop/lib/index.js')resolves topackages/core/tools/src/index.tsSymbol(@deepseek-ai/dsh-tools.scheduler)but are not identicalRelevant code:
packages/core/agent-loop/src/tool-calls.ts:170-ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(call.exec)packages/core/tools/src/index.ts:463-TOOL_RUNTIME_SCHEDULERpackages/core/tools/src/index.ts:798- the scheduler class fieldSuggested fix
Make the internal cross-package scheduler key survive duplicate module instances by registering it in the global symbol registry (already the repo's pattern for this, e.g.
packages/typert/protocol/src/owned-value.ts,packages/subagent/subagent/src/internal.ts):A one-line change in
packages/core/tools/src/index.ts(plus rebuildinglib/) fixes it; verified locally (a fresh session then executes tools normally). Fixing the resolver so plugin entries and their imports resolve on the same source/lib plane would remove the underlying inconsistency, but is a larger change.Notes
node_moduleslayout (.../dsh-agent-instructions/node_modules/@deepseek-ai/dsh-tools) may differ on macOS/Linux, so this may be platform-dependent. Snapshot tests boot source via tsx but do not appear to exercise this path.All reactions