Repository navigation
Plugin install hoists the @deepseek-ai runtime into the profile's node_modules; every agent-preset mount fails on the next cold boot #11143
Futuri-Risk
started this conversation in
General
Replies: 0 comments
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
Installing
@deepseek-ai/dsh-subagent-codexinto the desktop profile (via the plugin manager) copies the whole@deepseek-ai/*runtime stack into the profile'snode_modules(pnpmnodeLinker: hoisted+autoInstallPeers: true, as configured by the app'spnpm-workspace.yaml). After the next full app restart, every agent preset that contains apersonarow and atool-subagentrow with standingmodelSelectionSettings— i.e. the shippedstandardandcordispresets — fails to mount. Resuming any session recorded with those presets then fails, and the failure persists across restarts.Environment
@deepseek-ai/dsh-subagent-codex@0.2.1-rc.3,dsh-codex-connect@0.2.0-alpha.10,dsh-mobile@0.6.16Steps to reproduce
@deepseek-ai/dsh-subagent-codexthrough the plugin manager. Its manifest declares hard dependencies on@deepseek-ai/dsh-tool-subagent,dsh-brand,dsh-sdk-protocoland peers on@deepseek-ai/cordis,dsh-llm,dsh-session,dsh-subagent,dsh-subprocess,dsh-timeout. With the profile's pnpm config, the entire@deepseek-ai/*runtime (~48 packages:cordis,dsh-scope,dsh-system-prompt,dsh-tool-subagent, …) is materialized under~/.dsh/profiles/desktop/node_modules/@deepseek-ai/.agentPreset: "standard"(or create a new session).Actual behavior
Resume fails for every such session:
Both rows fail activation in
auditRows()duringmountPreset(); the mount failure is final for that boot, so it persists across restarts until the hoisted packages are removed.Root cause (from code inspection; workaround confirmed)
The profile-layer resolver intends
@deepseek-ai/*runtime packages to resolve to the installation entries embedded in the app, with the profile layer supplying a package only on an installation miss (thedsh-app-bootinterception layer /localPackageNamesgating; bounded native misses fall through to installation entries). The hoisted copies preempt the miss: any package name physically present underprofile/node_modules/@deepseek-airesolves to the profile copy, while names absent there (dsh-persona,dsh-agent-preset-registry, …) resolve to the app-embedded copy. The process then loads two instances of the runtime.Scope identity lives in module-level state (
@deepseek-ai/dsh-scope:createScope/scopeOf). The preset registry (app-embedded instance) creates the preset scope with one instance; rows and services resolved from the hoisted copies consult the other.scopeOf()therefore returnsundefinedfor the rows' activation contexts:personarow's section registration lands in the global prompt layer and collides withdsh-system-prompt's own deploymentdeployment:persona-prefixregistration ("already registered" without a scope);tool-subagentrow's standingmodelSelectionSettingsfinds no composition scope and throws (thecompositionScope === void 0branch indsh-tool-subagent's activation).An app process that was already running when the plugin was installed keeps working (modules cached, preset generation already mounted), which is why the breakage only appears on the first cold boot after the install.
Workaround (verified)
Move the hoisted runtime packages out of the profile's resolution path (keep
schemasteryanddsh-subagent-codexitself, which legitimately live there):After a restart, every
@deepseek-ai/*import from the profile layer misses natively, falls through to the embedded installation copies, and the presets mount again; sessions resume normally. Note: any later plugin-manager pnpm operation re-materializes the hoisted stack, so the workaround must be re-applied after plugin installs/updates — which is why this feels worth fixing at the packaging or resolution layer.Suggested fix directions
Either of:
dsh-subagent-codex(and similar profile plugins) should not declare host-provided runtime packages as hard deps/peers that pnpm materializes into the profile layer; or the plugin manager's pnpm invocation should exclude@deepseek-ai/*from hoisting (hoistPattern/publicHoistPatternexclusions).profile/node_modulesfor installation-registered names, so hoisted copies cannot shadow the embedded runtime.Happy to provide more detail (audit lines, the hoisted package list, plugin-manager install logs) if useful.
All reactions