Coding agents installed via Studio are written into the versioned Hermes Runtime directory and are lost after every Runtime upgrade
Summary
When a coding agent (Claude Code, Codex, Pi, Grok) is installed from the Agents page, the agent CLI is written into the managed Hermes Runtime directory rather than a user-owned, persistent global location. Because the Runtime is versioned and replaced with a fresh directory on every upgrade, the installed agent is no longer detected and the Agents page shows it as "Not installed" again, requiring a reinstall after every Studio / Runtime upgrade.
This affects all four coding agents equally. The behavior is only masked when the user happens to have an additional copy installed in the system-wide global npm directory (which lives in the stable shell PATH), in which case Studio finds that copy and reports the agent as installed. The underlying install-to-Runtime behavior is the same for every agent.
Environment
- Hermes Studio desktop, Windows x64
- Managed Hermes Runtime under
<HERMES_WEB_UI_HOME>/desktop-runtime/hermes/<version>/<platform> - Pi pinned by Studio to
@earendil-works/[email protected](plus a separatepi-mcp-adapter)
Expected behavior
A coding agent installed once should remain available across Studio and Runtime upgrades, regardless of whether the user also has a copy in the global npm directory.
Actual behavior
- Right after installing an agent from the Agents page, it is detected and
--versionsucceeds. - After upgrading the Hermes Runtime, the agent installed earlier is no longer found and the Agents page shows it as "Not installed".
- Reinstalling works, but it must be repeated after each upgrade.
- Claude Code / Codex (or any agent with a copy in the system-wide global npm directory) appear unaffected because the global copy keeps being detected; the Runtime-installed copy is still lost.
Reproduction steps
- On a machine with no pre-existing global copy of the agent, click Install
for, e.g., Pi (or Codex). Confirm it is reported installed and
pi --versionsucceeds. - Upgrade the managed Hermes Runtime to a newer version and restart Studio.
- Open the Agents page: the agent is shown as "Not installed".
- Reinstall; it works again until the next Runtime upgrade.
Root cause
Studio resolves npm from the process's active Node environment and runs a standard global install:
packages/server/src/modules/coding-agents/services/index.tsinstallCodingAgent()runsnpm install -g <package>.getNodeBinDir() = dirname(process.execPath).getNodePrefix()/getNpmCliCandidates()derive the npm prefix from that directory, i.e. the bundled Hermes Runtime Node.getGlobalNpmBin()=npm prefix -g.
Because the Studio Web service runs on the Hermes Runtime's bundled Node,
npm prefix -g points into the versioned Runtime directory, so
npm install -g writes the agent into that directory. The Runtime directory
is versioned and replaced wholesale on upgrade (the previous inactive version
is retained but no longer active), which removes the installed agent from the
active environment.
Suggested fix
- Install coding agents into a user-owned, persistent global location (e.g. the user's global npm directory) by default, so they survive Runtime upgrades; or
- Provide a UI option to install into a persistent location independent of the Managed Runtime; or
- Preserve / migrate already-installed coding agents when a new Runtime is activated.
Source: EKKOLearnAI/hermes-studio