Replies: 3 comments 1 reply
|
This matches a classic “two copies of the framework in one Node module graph” failure: the profile boots, plain chat works, but tool calls blow up with Practical mitigation until upstream hardens resolution:
If you can paste |
|
I traced the exact rc.8 identity boundary (
export const TOOL_RUNTIME_SCHEDULER: unique symbol = Symbol('@deepseek-ai/dsh-tools.scheduler')The Agent loop imports that key and calls rc.8's intended profile topology reinforces the report's recovery: generated workspace config sets For an upstream invariant, I would compare canonical realpaths from both the Host and importing-plugin resolution anchors and report package/version/importer/expected/actual paths before Session creation. It should inspect nested plugin copies, while avoiding false positives when multiple symlink paths canonicalize to the same physical file. I would not solve this only by changing to I wrote a transactional recovery and invariant-design runbook with native + MCP + restart gates here: |
|
Confirmed on both counts — thanks @sashabogi for keeping the broken profile as evidence, and @denial123789 for the identity boundary. The user-facing recipe is narrower than the unique-symbol internals:
#3557 is the same dual-copy split arriving through |
Uh oh!
There was an error while loading. Please reload this page.
Setup:
@deepseek-ai/dsh0.1.0-rc.7 from npm, node 26.3, macOS (arm64).If a profile's node_modules ends up holding a second copy of the core packages, boot succeeds and tool-free turns answer normally, but every turn that calls any tool (native or MCP) exits 1 with only this:
Sometimes it prints after the final answer and the exit code flips between runs, which makes it look like a teardown race. It isn't, it's deterministic on tool use.
How you get there naturally: hit the missing-peer error from installing
dsh-hooks-claude-code(reported separately: #3515), then "fix" it by running plainnpm installinside the profile. npm 7+ auto-installs peers, so the profile gains its own copies of dsh-agent, dsh-tools, dsh-session, dsh-code-runtime and friends alongside the ones in the dsh installation.What seems to happen: the loader mounts some plugins against one module instance of the core and some against the other, so the tool runtime scheduler is registered under one instance's key and read back under the other.
ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(...)(agent-loop/src/tool-calls.ts) then readsprepareoff undefined on the first tool call.Fix on our side: reinstall the profile with pnpm and
autoInstallPeers: false, matching the shipped template. Everything works after that, we verified a full agent run with native tools plus an MCP server.Suggestion: a boot-time invariant that detects a core package present in both the installation tree and the profile tree and fails loud naming both paths. The current error points nowhere near the cause, and we burned a while bisecting it (first suspected env vars, then our own SessionStart hook, both wrong).
All reactions