[Bug]: DSH profile dependencies are absolute-path junctions into a versioned Runtime - after an upgrade all links dangle and plugins silently disappear

Author: anmie-dhCreated Sep 29, 2026Updated Sep 29, 2026

Summary

Studio's DSH profile stores its dependencies as absolute-path junctions (fs.symlink(target, link, "junction")) whose targets live inside a specific, version-numbered install directory. When that directory is replaced or removed — a Hermes Runtime upgrade that deletes the previous version, or a dsh CLI reinstall — every link becomes dangling at once, and the affected plugins stop loading with no error that points at the cause.

This is a different defect from the one in #2913 (coding-agent CLIs installed into the Runtime npm prefix) and from #3039 / #3038 (generated plugin manifests missing version). Here the configuration is fully intact — only the links are dead.

Environment

Item Value
Ekko Studio Desktop 0.7.25
Hermes Runtime 0.21.5 win-x64 (previous version 0.21.3 deleted)
Bundled dsh @deepseek-ai/dsh 0.1.7-rc.2
OS Windows x64
Studio home %USERPROFILE%\.hermes-web-ui
DSH home %USERPROFILE%\.dsh

Evidence 1 — Studio's own management profile links into the versioned Runtime

C:\Users\<user>\.hermes-web-ui\coding-agents\dsh\management\host-<id>\profiles\studio-plugins\node_modules\@deepseek-ai\dsh-base
  LinkType : Junction
  Target   : C:\Users\<user>\.hermes-web-ui\desktop-runtime\hermes\0.21.3\win-x64\node\node_modules\@deepseek-ai\dsh\node_modules\@deepseek-ai\dsh-base

0.21.3 no longer exists. The link is dangling:

Test-Path <junction>                 -> True     (the reparse point is still there)
Test-Path <junction>\package.json    -> False
Get-ChildItem <junction>             -> (empty)

The target is version-pinned and absolute, so it can only be correct for the Runtime version that was active when the link was written.

Honest caveat: this particular profile lives under management\host-<random> and the generator creates it with mkdtemp() on each start (fs.mkdtemp(join(managementDir, "host-")), previous host-* removed first), so this directory self-heals on the next launch. It is included because it is the clearest proof that Studio's profile generation resolves packages to an absolute path inside the versioned Runtime and links to it directly.

Evidence 2 — the persistent DSH profile store is fully dangled (this one does not self-heal)

C:\Users\<user>\.dsh\profiles\node_modules:

Measurement Result
Top-level entries 200
Top-level junctions (unscoped packages) 173
Top-level junctions still resolving (package.json readable) 0
Scope directories (@deepseek-ai, @modelcontextprotocol, @aws-sdk, …) 27
Package junctions inside those scopes 338
Scope junctions still resolving 0
Total links / total broken 511 / 511

Every one of them points at the same now-missing tree:

C:\Users\<user>\AppData\Roaming\npm\node_modules\@deepseek-ai\dsh\node_modules\<pkg>

and %APPDATA%\npm\node_modules\@deepseek-ai is currently an empty directory (0 entries) — the source install was removed/replaced, so all 511 absolute targets vanished at once.

The configuration that depends on those links is untouched and still correct:

json
// %USERPROFILE%\.dsh\profiles\web\package.json
{ "name": "dsh-profile-web", "private": true, "dependencies": {},
  "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app"] } } }

So the user-visible result is: the profile looks configured, nothing reports a configuration error, and plugins simply do not load.

Why it cannot be fixed by repointing the links

Checking each of the 173 top-level links against the current Runtime's bundled dsh (…\hermes\0.21.5\win-x64\node\node_modules\@deepseek-ai\dsh\node_modules, 160 packages):

Result Count
Resolvable in the new Runtime 100
Not present in the new Runtime 73

Missing examples: express, cors, cookie, cookie-signature, body-parser, accepts, depd, etag, fresh, finalhandler, forwarded, encodeurl, escape-html, ajv-formats, clsx, dunder-proto, function-bind, call-bind-apply-helpers, es-errors, es-object-atoms, …

Because the old package set is not a subset of the new one, a Runtime upgrade cannot be repaired by rewriting link targets — the dependency tree has to be reinstalled.

Why this is a bad failure mode

  1. Silent. A dangling junction is not an error to Test-Path (the reparse point resolves as an object) — only reading through it fails. So the breakage surfaces as "plugin unavailable" / "agent gone", not "link broken".
  2. All-or-nothing. A single directory rename invalidates every link in the store simultaneously (511 here).
  3. No diagnosis path. Studio's failure text is DSH plugin resource unavailable, which does not mention junctions, the Runtime version, or the missing target prefix. Users reasonably conclude their plugins/agents were deleted and reinstall everything.
  4. No self-healing. Nothing validates the links on startup or on Runtime activation.

Steps to reproduce

  1. Have a DSH profile with installed plugin dependencies (links present and resolving).
  2. Upgrade the Hermes Runtime and delete the previous version directory — or reinstall/replace the global dsh install the links point into.
  3. Start Studio and open the DSH/plugins surface.
  4. Observe: configuration is unchanged, but the profile cannot load its dependencies. Enumerate the links:
powershell
$base = "$env:USERPROFILE\.dsh\profiles\node_modules"
Get-ChildItem -Force $base -Directory |
  Where-Object { $_.LinkType -match 'Junction|SymbolicLink' } |
  ForEach-Object {
    [pscustomobject]@{
      Link  = $_.FullName
      Target= ($_.Target -join ';')
      OK    = Test-Path (Join-Path $_.FullName 'package.json')
    }
  } | Group-Object OK | Select-Object Name, Count

Expected behavior

A profile that is validly configured should keep working across a Runtime upgrade (or a dsh update), or fail with a message that names the broken link and its missing target and offers a repair.

Suggested fixes (any one of these would remove the class of bug)

  1. Link relative to a stable root. Resolve the target so that the link is valid for whatever install is currently active, instead of embedding an absolute version-pinned path.
  2. Validate and self-heal on startup / Runtime activation. Walk the profile's links, detect dangling ones, and either repoint or reinstall the dependency tree — then report the outcome.
  3. Don't link across an upgrade boundary at all. Materialize (copy) or use a content-addressed store for the profile's dependencies so a Runtime swap cannot invalidate them.
  4. Minimum viable improvement: detect dangling links before use and surface a specific error plus a one-click repair, instead of DSH plugin resource unavailable.

Note on where this belongs

I verified the junction-creation call in Studio's shipped server bundle:

javascript
let g = join(profileDir, "node_modules", pkg);
await mkdir(dirname(g), { recursive: true });
await fs.symlink(resolvedPkgDir, g, process.platform === "win32" ? "junction" : "dir");

That covers the studio-plugins profile in Evidence 1. The store in Evidence 2 (~/.dsh/profiles) is the DSH profile home and may be created by the dsh CLI rather than by Studio — if so, please route that half upstream. I am filing this here because the user-visible symptom appears inside Studio and because both groups share the same absolute-target, no-validation design.

Workaround

Restoring the missing install at its original prefix makes all 511 targets resolve again without touching the links:

powershell
npm install -g --prefix "$env:APPDATA\npm" @deepseek-ai/dsh

Otherwise the profile's dependencies have to be reinstalled.

Source: EKKOLearnAI/hermes-studio