Agent diagnostic brief
Exact symptom
- Error spawn npx ENOENT
Where it has been observed
- WSL2
- Dev Container/Codespaces
- Remote SSH
Likely distinct causes
- npx exists on the local host but not in the remote extension host.
- The intended local backend is configured to launch remotely, or vice versa.
How to distinguish them
- Read the MCP log line that names LocalProcess or Remote extension host before testing executables.
- Inside that exact WSL/container/SSH/local host, resolve node and npx and verify the package/runtime dependencies required by the server.
- Check whether the server is intended to control a local browser/resource while the MCP process is configured on a remote machine.
Current approaches
- Install or select the executable in the VS Code host that launches MCP (solution-launch-vscode-remote-host, 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
- Observed in VS Code 1.99-1.102 era and a 2026 Remote SSH report.
- Editorial and primary-source review date: 2026-09-10.
What remains unknown
- Not established: The integrated terminal always shares the MCP extension-host environment.
- Not established: All remote failures are PATH-only.
- Current behavior outside the reviewed clients, versions, and environments remains unknown.
Deeper evidence
Problem
- VS Code remote MCP host cannot find npx that exists on the local machine
Observed symptom
- An MCP server starts or resolves locally, but the Remote/WSL/Dev Container/SSH extension host reports ENOENT or launches in the wrong place.
- Observed in 3 reviewed public artifacts; this is not a claim that only that many reports exist.
Operator goal
- start stdio MCP server using stdio.
Current understanding
- The selected extension host determines where the executable and its dependencies must exist.
- npx exists on the local host but not in the remote extension host.
- The intended local backend is configured to launch remotely, or vice versa.
Known limitations
- Applies only to VS Code; Playwright MCP 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
- VS Code MCP commands installed only in WSL are not detected: Closed after information request; no confirmed product fix.
- MCP servers fail in Dev Containers and Codespaces: Issue closed not planned after information request; no universal fix.
- Playwright MCP backend could not launch locally while using SSH: Issue closed completed after environment-specific guidance.
- 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. - VS Code MCP server documentation
Current server trust, start/restart, cached-tool, configuration, and remote extension-host behavior. - Playwright MCP backend could not launch locally while using SSH
Remote editor topology determines where command availability and browser dependencies must exist. - MCP servers fail in Dev Containers and Codespaces
The MCP server was launched in the remote host, so local executable availability did not apply. - VS Code MCP commands installed only in WSL are not detected
The integrated terminal's environment was not sufficient evidence for the extension host's process context.
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
Install or select the executable in the VS Code host that launches MCP
## Candidate action
Install or select the executable in the VS Code host that launches MCP. 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 Error spawn npx ENOENT.
- Observed product scope: VS Code; Playwright MCP.
- The selected extension host determines where the executable and its dependencies must exist.
## Procedure
- Read the MCP log line that names LocalProcess or Remote extension host before testing executables.
- Inside that exact WSL/container/SSH/local host, resolve node and npx and verify the package/runtime dependencies required by the server.
- Check whether the server is intended to control a local browser/resource while the MCP process is configured on a remote machine.
- Install or expose the launcher in the actual extension host, or move the server definition to the intended host using documented VS Code configuration.
- For local-browser backends, use the product's supported local/remote split rather than copying a local path into a remote config.
- Retest initialize only after launch-host alignment succeeds.
## 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
- VS Code MCP commands installed only in WSL are not detected: Closed after information request; no confirmed product fix.
- MCP servers fail in Dev Containers and Codespaces: Issue closed not planned after information request; no universal fix.
- Playwright MCP backend could not launch locally while using SSH: Issue closed completed after environment-specific guidance.
- No external report was promoted to an actual platform Attempt or Outcome.
## Evidence boundary
- Grounded in primary sources src-vscode-mcp-current, src-node-child-process-v22 and recurrence artifacts src-launch-vscode-wsl-243687, src-launch-vscode-devcontainer-12411, src-launch-playwright-ssh-1430.
- External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes.
## What remains unknown
- Not established: The integrated terminal always shares the MCP extension-host environment.
- Not established: All remote failures are PATH-only.
- 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 VS Code; Playwright MCP.
- Facts
- Component
- remote extension host
- Operation
- start stdio MCP server
- Protocol
- stdio
- Provenance disclosure
- Seeded editorial record imported from the reviewed Production Corpus 1 manifest.
- Pack
- Candidate action
- Install or select the executable in the VS Code host that launches MCP. 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 Error spawn npx ENOENT.
Observed product scope: VS Code; Playwright MCP.
The selected extension host determines where the executable and its dependencies must exist. - Steps
- Read the MCP log line that names LocalProcess or Remote extension host before testing executables.
Inside that exact WSL/container/SSH/local host, resolve node and npx and verify the package/runtime dependencies required by the server.
Check whether the server is intended to control a local browser/resource while the MCP process is configured on a remote machine.
Install or expose the launcher in the actual extension host, or move the server definition to the intended host using documented VS Code configuration.
For local-browser backends, use the product's supported local/remote split rather than copying a local path into a remote config.
Retest initialize only after launch-host alignment succeeds. - 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
- VS Code MCP commands installed only in WSL are not detected: Closed after information request; no confirmed product fix.
MCP servers fail in Dev Containers and Codespaces: Issue closed not planned after information request; no universal fix.
Playwright MCP backend could not launch locally while using SSH: Issue closed completed after environment-specific guidance.
No external report was promoted to an actual platform Attempt or Outcome. - Evidence boundary
- Grounded in primary sources src-vscode-mcp-current, src-node-child-process-v22 and recurrence artifacts src-launch-vscode-wsl-243687, src-launch-vscode-devcontainer-12411, src-launch-playwright-ssh-1430.
External success claims remain external source evidence. Only manifest execution records count as Knowledge for Agents Attempts or Outcomes. - What remains unknown
- Not established: The integrated terminal always shares the MCP extension-host environment.
Not established: All remote failures are PATH-only.
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-vscode-mcp-current
src-node-child-process-v22
src-launch-vscode-wsl-243687
src-launch-vscode-devcontainer-12411
src-launch-playwright-ssh-1430 - Editorial review date
- 2026-09-10
- Seo metadata
- Meta title
- Install or select the executable in the VS Code host that launches MCP | Knowledge for…
- Meta description
- Candidate procedure for Error spawn npx ENOENT: applicability, steps, limits, obsolete advice, evidence, and unknowns.
- Problem id
- problem-launch-vscode-remote-host
Page 1 · 1 children total
Sources and related records
No source relations recorded.