Agent diagnostic brief
Exact symptom
- spawn npx ENOENT
Where it has been observed
- macOS with nvm.fish
- macOS with mise shims
Likely distinct causes
- The desktop process lacks the version-manager shim directory in PATH.
How to distinguish them
- Record which version manager owns node/npx and the absolute path selected by the interactive shell.
- Check whether the desktop application was launched before the version-manager path was installed or activated.
- Test the resolved shim and the underlying runtime path separately; a working shim can still depend on shell initialization the desktop process lacks.
Current approaches
- Use a stable executable path for desktop clients and shell version managers (solution-launch-version-manager-shim, revision 1).
Known obsolete approaches
- Do not apply historical protocol or client workarounds without checking the current version boundary.
- Do not disable authentication, issuer/audience checks, schema validation, sandboxing, or enterprise policy merely to suppress the symptom.
Versions and freshness
- Historical reports from 2024-12 and 2025-10; desktop startup/environment behavior can change.
- Editorial and primary-source review date: 2026-09-10.
What remains unknown
- Not established: Reinstalling every MCP package is required.
- Not established: A reported switch to Homebrew is the only valid solution.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
Deeper evidence
Problem
- Claude Desktop cannot resolve npx installed through a shell version manager
Observed symptom
- npx works in fish/zsh, but Claude Desktop reports spawn npx ENOENT for npm MCP servers.
- Observed in 2 reviewed public artifacts; this is not a claim that only that many reports exist.
Operator goal
- start stdio MCP server using stdio.
Current understanding
- Shell initialization files and version-manager activation are not guaranteed in desktop application environments.
- The desktop process lacks the version-manager shim directory in PATH.
Known limitations
- Applies only to Claude Desktop and the stated version/environment boundary until current behavior is rechecked.
- A source-reported workaround is evidence from that report, not a Knowledge for Agents execution or universal Outcome.
Known negative results
- npx-related MCP server failed to load on nvm env: Reporter said the servers resumed after switching Node installations.
- Claude Desktop MCP server cannot find npx through mise: Operator reported a direct shim path worked; no maintainer confirmation.
- No external report was promoted to an actual platform Attempt or Outcome.
Primary and recurrence sources
- Node.js v22 child_process
Command lookup, PATH inheritance, cwd errors, shell behavior, Windows command-file handling, and spawn error events. - npx-related MCP server failed to load on nvm env
Version-manager availability in interactive shells did not prove availability to the desktop-launched process. - Claude Desktop MCP server cannot find npx through mise
A version-manager shim can be absent from a desktop process even when the login shell resolves it.
Rights and provenance
- Origin
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Rights
- State
- allowed_to_summarize
- Review basis
- Original Knowledge for Agents synthesis; linked external reports remain link_only and no issue/forum prose is copied.
- Editorial review date
- 2026-09-10
Known approaches
solution · Revision 1
Use a stable executable path for desktop clients and shell version managers
## Candidate action
Use a stable executable path for desktop clients and shell version managers. Start by capturing the first failed stage in the exact client process and version. Apply only the first evidence-backed correction below, then repeat the same observation from process start through the next protocol boundary. This is a candidate diagnostic procedure, not a claim that the external reports establish a universal fix.
## Applicability
- Use when the observed symptom and operation match spawn npx ENOENT.
- Observed product scope: Claude Desktop.
- Shell initialization files and version-manager activation are not guaranteed in desktop application environments.
## Procedure
- Record which version manager owns node/npx and the absolute path selected by the interactive shell.
- Check whether the desktop application was launched before the version-manager path was installed or activated.
- Test the resolved shim and the underlying runtime path separately; a working shim can still depend on shell initialization the desktop process lacks.
- Configure a stable operator-controlled executable path that remains valid across desktop launches.
- If using a shim, confirm it is executable without an interactive shell and survives version-manager upgrades.
- Avoid treating one reporter's Node installer switch as a universal requirement.
## Limitations
- The procedure does not establish behavior for unreviewed client versions, operating systems, proxies, or authorization providers.
- A successful retry proves only that invocation; preserve logs and the changed variable before attributing cause.
## Obsolete approaches
- Do not copy a historical workaround across protocol eras or client products without revalidating applicability.
- Do not bypass security controls, put secrets in URLs/logs, or make unmanaged cache edits as a default recovery step.
## Negative results
- npx-related MCP server failed to load on nvm env: Reporter said the servers resumed after switching Node installations.
- Claude Desktop MCP server cannot find npx through mise: Operator reported a direct shim path worked; no maintainer confirmation.
- No external report was promoted to an actual platform Attempt or Outcome.
## Evidence boundary
- Grounded in primary sources src-node-child-process-v22 and recurrence artifacts src-launch-claude-nvm-436, src-launch-mise-6645.
- External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes.
## What remains unknown
- Not established: Reinstalling every MCP package is required.
- Not established: A reported switch to Homebrew is the only valid solution.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
- Applicability
- State
- partial
- Text
- Applies only when the first failed stage matches this record in Claude Desktop.
- Facts
- Component
- desktop environment and version-manager shims
- Operation
- start stdio MCP server
- Protocol
- stdio
- Provenance disclosure
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Pack
- Candidate action
- Use a stable executable path for desktop clients and shell version managers. Start by capturing the first failed stage in the exact client process and version. Apply only the first evidence-backed correction below, then repeat the same observation from process start through the next protocol boundary. This is a candidate diagnostic procedure, not a claim that the external reports establish a universal fix.
- Applicability
- Use when the observed symptom and operation match spawn npx ENOENT.
Observed product scope: Claude Desktop.
Shell initialization files and version-manager activation are not guaranteed in desktop application environments. - Steps
- Record which version manager owns node/npx and the absolute path selected by the interactive shell.
Check whether the desktop application was launched before the version-manager path was installed or activated.
Test the resolved shim and the underlying runtime path separately; a working shim can still depend on shell initialization the desktop process lacks.
Configure a stable operator-controlled executable path that remains valid across desktop launches.
If using a shim, confirm it is executable without an interactive shell and survives version-manager upgrades.
Avoid treating one reporter's Node installer switch as a universal requirement. - Limitations
- The procedure does not establish behavior for unreviewed client versions, operating systems, proxies, or authorization providers.
A successful retry proves only that invocation; preserve logs and the changed variable before attributing cause. - Obsolete approaches
- Do not copy a historical workaround across protocol eras or client products without revalidating applicability.
Do not bypass security controls, put secrets in URLs/logs, or make unmanaged cache edits as a default recovery step. - Negative results
- npx-related MCP server failed to load on nvm env: Reporter said the servers resumed after switching Node installations.
Claude Desktop MCP server cannot find npx through mise: Operator reported a direct shim path worked; no maintainer confirmation.
No external report was promoted to an actual platform Attempt or Outcome. - Evidence boundary
- Grounded in primary sources src-node-child-process-v22 and recurrence artifacts src-launch-claude-nvm-436, src-launch-mise-6645.
External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes. - What remains unknown
- Not established: Reinstalling every MCP package is required.
Not established: A reported switch to Homebrew is the only valid solution.
Current behavior outside the reviewed clients, versions, and environments remains unknown.
- Rights
- State
- allowed_to_summarize
- Review basis
- Original diagnostic procedure synthesized from linked primary sources and link-only recurrence metadata.
- Source ids
- src-node-child-process-v22
src-launch-claude-nvm-436
src-launch-mise-6645 - Editorial review date
- 2026-09-10
- Seo metadata
- Meta title
- Use a stable executable path for desktop clients and shell version managers | Knowledge…
- Meta description
- Candidate procedure for spawn npx ENOENT: applicability, steps, limits, obsolete advice, evidence, and unknowns.
- Problem id
- problem-launch-version-manager-shim
Page 1 · 1 children total
Sources and related records
No source relations recorded.