Replies: 7 comments
|
Confirmed on Linux (WSL2 Ubuntu 22.04, Node v22.23.2, ddefc45 / 0.1.6-alpha.2): same stack at One more workaround worth having alongside the node apps/cli/lib/bin.js web # or: --profile headless '<task>'Everything then stays on the |
|
One more data point — macOS this time, and on the fix side rather than the diagnosis side. Environment: macOS 14.0 (arm64), Node v22.19.0, pnpm 11.7.0, The split reproduces straight from the source-launch vector, no instrumentation — just two imports in one process: $ node --import tsx/esm probe.mjs
bare specifier resolves to : …/packages/core/tools/src/index.ts
relative lib specifier : …/packages/core/tools/lib/index.js
same module instance : false
ToolRuntime class identical: false
Symbol identity identical : false
lookup with bare-plane key : undefined # the crash site, reproduced in isolationThen I reverted only the CLI default at - const resolutionMode = packaged ? 'runtime' : options.resolutionMode ?? 'runtime'
+ const resolutionMode = packaged ? 'runtime' : options.resolutionMode ?? 'link'$ pnpm dsh --profile headless "run pwd with the bash tool and reply with just the path"
/Users/…/deepseek-harness # exit 0, tool executedThat same command died with Caveat: verified on macOS only. Windows has the separate source-launch failure in #7320, which I did not test. |
|
都4天了 还没修 拉 |
|
dsh-v0.1.6-alpha.1 is ok. back version. |
|
我也是这个问题![Bug] v0.1.6-alpha.2 本地构建后按文档用 tsx 启动(pnpm run dsh web),任何工具调用都会崩溃并污染会话 Summary按官方开发文档从源码启动 Web(先 Environment
Reproduction
Current behavior
Expected behavior工具正常执行;即便工具调度失败,也不应把会话变成无法继续的状态(例如写入一条合成的错误 tool/result,或明确提示需要新开会话)。 Root cause(已定位并在本机复现)同一进程里
最小验证(不需要调用模型)在 profile 目录(
Workaround(已验证可用)不叠加 tsx 启动,全部走构建产物: (改源码后需要重新 可能的修复方向
|
|
Thanks for the detailed report and the Linux, macOS and Windows confirmations. We've linked this report to the existing investigation into source-launch tool scheduling failures, including the missing tool results that can prevent a failed session from continuing. The built-entry workaround reported here is useful, but it is not evidence that existing failed sessions are repaired. We have not yet verified a publicly available release covering both normal tool execution and recovery of those sessions; we'll follow up here once that is confirmed. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Running the CLI from source (
pnpm dsh web,pnpm dsh --profile headless "…") crashes on every tool call:This reproduces deterministically on a fresh headless session, independent of any existing session data:
Regression
9ddef327a4(feat: resolution mode link to runtime) changed the source-launch default resolution mode fromlinktoruntime:Root cause
The crash point is the agent-loop scheduler lookup:
TOOL_RUNTIME_SCHEDULERis a module-localSymbol(packages/core/tools/src/index.ts:463), compared by reference.ctx.tools[TOOL_RUNTIME_SCHEDULER]isundefinedbecause the process ends up with two module instances of@deepseek-ai/dsh-tools— thesrc/face and thelib/face — whose symbols are unequal.In
runtimemode,createProfileResolutionGeneration+installProfileResolutionpatch Node's internal ESM/CJS resolvers to route bare specifiers whose parent lives inside the profile scope to the resolved installation generation. Plugin rows therefore resolve to the builtlib/index.jsentries (viapackage.jsonexports):But the bare imports inside those same
libfiles are not profile-scoped parents, so they bypass the router and fall through to tsx, which appliestsconfigpathsand remaps them back tosrc/. The result is a split graph in one process, confirmed empirically:ctx.toolsis thelib-faceToolRuntime(mounted by the row), while the loop reads it with thesrc-face symbol →undefined→ crash.runtimemode was built for packaged executables (no tsx, no tsconfigpaths), where lib-internal imports stay on thelibface. Under a tsx source launch it is not self-consistent.Additional failure mode (cascade)
Because the turn errors after
tool/callis recorded but beforetool/result(tool-calls.tsappends the call before the schedulerprepare), the session log is left with a dangling tool call. Every subsequent turn replays it and is rejected by the serializer withINVALID_REQUEST: DeepSeek Messages tool calls need immediate results(packages/llm/llm-deepseek/src/protocols/messages/serialize.ts:117), permanently bricking the session.Suggested fix
Either:
linkas the default for source launches (restore the pre-9ddef327a4behavior), sinceruntimeis only correct for packaged runtimes; orruntimemode self-consistent by also resolving bare imports whose parent is a workspacelibfile onto thelibface (i.e. prevent tsxpathsremapping of built output), so there is only ever one face.Independently, consider hardening the loop against a mid-tool-call crash so a failed turn cannot leave a dangling
tool/callthat bricks the session (e.g. synthesize an errortool/resultfor started-but-unresolved calls, consistent with the existing abort path inappendSkippedToolCall).All reactions