Replies: 1 comment
|
As a consequence, after installing on Windows using the recommended pathway, my sessions can boot up. But it will soon get stuck because of a failed tool call (the DSH session error message does not explain why). It took a long time for me to debug and find the root cause. I managed to fix it and get sessions working again after launching the built artifact plane instead (plain Node, no tsx): cd path_to_dsh\deepseek-harness
node apps/cli/lib/bin.js web --port 3080 --no-open |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Tool calls fail with
Cannot read properties of undefined (reading 'prepare')when the harness is launched through the documented source entry (pnpm dsh→node --import tsx/esm apps/cli/src/bin.ts) on a repository that has been built, as the docs require. The same profile works through the built entry (node apps/cli/lib/bin.js).Cause: two module planes load in one process.
@deepseek-ai/dsh-toolsis evaluated twice — once fromsrc/index.ts(tsx applying tsconfigpaths) and once fromlib/index.js(Nodeexportsresolution) — soTOOL_RUNTIME_SCHEDULER, aunique symbol, ends up with two identities.ctx.toolsis constructed by thelib/copy whiledsh-agent-looplooks the symbol up from thesrc/copy, yieldingundefined.prepare. This violates the "source plane vs artifact plane, never mixed" rule in AGENTS.md.Reproduction
Fails on the first tool call. The shipped
headlessprofile reproduces it, so no user profile, patch, or preset is involved, and any tool fails — not justpwsh.Current behavior
The turn ends with
{"kind":"error","error":{"message":"Cannot read properties of undefined (reading 'prepare')","code":"UNKNOWN"}}persisted in the session log. No stack is recorded, so the cause is not diagnosable from the Session.Module-resolution hook output, same process:
The split traces to a package
tsconfig.jsonwhoseextendschain breaks when the package is reached through the profile's on-disk module link (apps/cli/node_modules/@deepseek-ai/*), so tsx finds nopathsfor that importer and falls back to Node resolution:../../../tsconfig.base.jsonapps/cli/node_modules/@deepseek-ai/dsh-agent-instructions/paths→lib/index.jspackages/context/agent-instructions/paths→src/index.tsExpected behavior
Both documented launchers dispatch tool calls. The source-execution reference supports both:
pnpm run buildthenpnpm dsh <args...>, and "the installed form launches the builtapps/cli/lib/bin.jswithout rebuilding the repository."Environment
Coverage gap
apps/cli/tests/source-launch.compat.spec.tsis the source-launcher gate, and it only asserts the--profile <name> is requireddiagnostic. It never boots a profile or dispatches a tool, so a dual-evaluation regression passes CI silently. I did not find another gate that boots a profile from source and dispatches a tool call.All reactions