Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
On Windows, every Cursor CLI agent session leaks a cmd.exe that never exits. The TypeScript language server never starts.
The CLI resolves npx through find-executable. For an npx.cmd shim that helper returns the full invocation:
{ cmd: “C:\Windows\System32\cmd.exe”, args: [“/C”, “C:\path\to\npx.cmd”] }
The TypeScript provider in @anysphere/local-lsp keeps only cmd and discards args:
const resolved = findExecutable(“npx”, )
spawn(resolved.cmd, [“-y”, “typescript-language-server”, “–stdio”], { windowsHide: true })
The process that stays alive is:
C:\WINDOWS\System32\cmd.exe -y typescript-language-server --stdio
Without /C, cmd.exe does not run npx. It opens an interactive prompt and waits. windowsHide does not make that process exit. With Windows Terminal as the default console host, each of these consoles can show up as a terminal window.
worker.log records the same failure:
Starting typescript-language-server npxPath=C:\WINDOWS\System32\cmd.exe
Child Typescript LSP process spawned with PID: …
TypeScript Server stderr chunk: ERROR: [object Object]
In one project the worker log showed 129 start attempts. One cmd.exe stayed alive per agent session. Running that exact command line by hand does not exit.
Steps to Reproduce
- On Windows, use a Node install where npx is npx.cmd (npm or nvm).
- Start the Cursor CLI agent in any workspace.
- Read %USERPROFILE%.cursor\projects<project>\worker.log.
- List processes. A cmd.exe remains with command line: C:\WINDOWS\System32\cmd.exe -y typescript-language-server --stdio
Expected Behavior
Spawn cmd.exe /C npx.cmd -y typescript-language-server --stdio, using the args that find-executable already returns. The process should exit when npx or the language server exits.
Operating System
Windows 10/11
Version Information
CLI Version 2026.10.19-6bbf2c4
Additional Information
Confirmed in the installed bundle index.js of that CLI version, modules ../utils/dist/find-executable.js and @anysphere/local-lsp typescript-provider. The provider log line calls the resolved command npxPath, and on Windows that value is C:\WINDOWS\System32\cmd.exe.
OS build: Windows 11 10.0.26200.
Does this stop you from using Cursor
No - Cursor works, but with this issue