<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RIGSWEEP.COM</title>
    <description>The latest articles on DEV Community by RIGSWEEP.COM (@rigsweep).</description>
    <link>https://dev.to/rigsweep</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259490%2Fc9bb932d-779d-4e6c-b910-4834d72f6d71.png</url>
      <title>DEV Community: RIGSWEEP.COM</title>
      <link>https://dev.to/rigsweep</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rigsweep"/>
    <language>en</language>
    <item>
      <title>Port 3000 is already in use on Windows: find it, end it, keep it from coming back</title>
      <dc:creator>RIGSWEEP.COM</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:21:23 +0000</pubDate>
      <link>https://dev.to/rigsweep/port-3000-is-already-in-use-on-windows-find-it-end-it-keep-it-from-coming-back-3peg</link>
      <guid>https://dev.to/rigsweep/port-3000-is-already-in-use-on-windows-find-it-end-it-keep-it-from-coming-back-3peg</guid>
      <description>&lt;p&gt;&lt;strong&gt;"Port 3000 is already in use" (&lt;code&gt;EADDRINUSE&lt;/code&gt;) means another process is listening on that port.&lt;/strong&gt; On a dev machine it is usually a dev server that kept running after its terminal closed. Find the owner with &lt;code&gt;netstat -ano | findstr :3000&lt;/code&gt;, check it with &lt;code&gt;tasklist&lt;/code&gt;, and end it if it is a leftover.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Find the process that owns the port
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Command Prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat -ano &lt;span class="o"&gt;|&lt;/span&gt; findstr :3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for a line in the &lt;code&gt;LISTENING&lt;/code&gt; state. The last number is the process ID (PID).&lt;/p&gt;

&lt;h3&gt;
  
  
  PowerShell
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetTCPConnection&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;LocalPort&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;State&lt;/span&gt; &lt;span class="nc"&gt;Listen&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;LocalAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;LocalPort&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;OwningProcess&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What is that PID?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;tasklist&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;FI&lt;/span&gt; &lt;span class="s2"&gt;"PID eq 12345"&lt;/span&gt;
&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;CimInstance&lt;/span&gt; &lt;span class="nc"&gt;Win32_Process&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;Filter&lt;/span&gt; &lt;span class="s2"&gt;"ProcessId = 12345"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ParentProcessId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CommandLine&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command line tells you which project and tool it is, for example &lt;code&gt;node ... next dev&lt;/code&gt; or &lt;code&gt;python -m uvicorn ...&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. End it safely
&lt;/h2&gt;

&lt;p&gt;If it is a dev server you no longer need, end it and its child processes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="n"&gt;taskkill&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;PID&lt;/span&gt; &lt;span class="mi"&gt;12345&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;F&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or in PowerShell, for a single process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Stop&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;Process&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Id&lt;/span&gt; &lt;span class="mi"&gt;12345&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't end a process you can't identify. If the owner is &lt;code&gt;svchost.exe&lt;/code&gt;, &lt;code&gt;System&lt;/code&gt; or a database you run on purpose, pick another port for your app instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common causes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Owner you see&lt;/th&gt;
&lt;th&gt;Likely cause&lt;/th&gt;
&lt;th&gt;What to do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;node.exe&lt;/code&gt;, &lt;code&gt;python.exe&lt;/code&gt;, &lt;code&gt;bun.exe&lt;/code&gt;, &lt;code&gt;dotnet.exe&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;A dev server left running after its terminal closed, or after Ctrl+C stopped only the npm or cmd wrapper&lt;/td&gt;
&lt;td&gt;Check the command line, then end the tree with &lt;code&gt;taskkill /T /F&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;wslrelay.exe&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A server running inside WSL 2. Windows forwards its localhost port through this relay&lt;/td&gt;
&lt;td&gt;Stop the server inside WSL. &lt;code&gt;wsl -e ss -ltnp&lt;/code&gt; shows Linux listeners. &lt;code&gt;wsl --shutdown&lt;/code&gt; stops everything in WSL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A Docker Desktop process&lt;/td&gt;
&lt;td&gt;A container publishes the port&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;docker ps --filter "publish=3000"&lt;/code&gt;, then stop that container&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nothing listens, yet the bind fails with &lt;code&gt;EACCES&lt;/code&gt; or a permissions error&lt;/td&gt;
&lt;td&gt;The port is inside a range Windows reserved, often for Hyper-V, WSL 2 or Docker&lt;/td&gt;
&lt;td&gt;See the next section&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Reserved port ranges (Hyper-V, WSL 2, Docker)
&lt;/h2&gt;

&lt;p&gt;Windows can reserve blocks of ports for Hyper-V and related features. A port inside a reserved block can't be used even though no process owns it. Node reports this as &lt;code&gt;listen EACCES: permission denied&lt;/code&gt; instead of &lt;code&gt;EADDRINUSE&lt;/code&gt;. List the reserved ranges:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;netsh interface ipv4 show excludedportrange protocol=tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your port falls inside a listed range, the simplest fix is to use a port outside it. Restarting the WinNAT service (&lt;code&gt;net stop winnat&lt;/code&gt;, then &lt;code&gt;net start winnat&lt;/code&gt;, as administrator) often releases the reservation until the next restart. It briefly interrupts networking for WSL and containers.&lt;/p&gt;

&lt;h2&gt;
  
  
  How RigSweep helps
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://rigsweep.com/" rel="noopener noreferrer"&gt;RigSweep&lt;/a&gt;'s Dev Cleanup tab lists every dev server, build daemon, MCP server and agent CLI with its project folder, age, RAM and listening ports, so the process holding &lt;code&gt;localhost:3000&lt;/code&gt; is visible by name and project. A dev server whose terminal is gone is pre-selected, even when it still holds a port. Processes owned by your editor are locked, the WSL 2 / Docker VM is never pre-selected, and nothing is ended until you click. RigSweep doesn't change reserved port ranges.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3lmhu2n3yw1r8j794pys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3lmhu2n3yw1r8j794pys.png" alt="RigSweep Network tab: Who is using it? finds the process that holds a port, next to a list of listening ports per process" width="800" height="529"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;This PC → Network: type a port and see which process holds it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;See also: &lt;a href="https://rigsweep.com/guides/claude-code-leftover-processes-windows/" rel="noopener noreferrer"&gt;Claude Code and MCP servers left running on Windows&lt;/a&gt;. &lt;a href="https://github.com/yobotn/rigsweep/releases/latest" rel="noopener noreferrer"&gt;Download RigSweep&lt;/a&gt; (free, MIT).&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I find what is using port 3000 on Windows?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;netstat -ano | findstr :3000&lt;/code&gt; and read the PID in the last column of the LISTENING line, or in PowerShell run &lt;code&gt;Get-NetTCPConnection -LocalPort 3000 -State Listen&lt;/code&gt;. Then &lt;code&gt;tasklist /FI "PID eq &amp;lt;pid&amp;gt;"&lt;/code&gt; shows the program.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I kill the process on port 3000?
&lt;/h3&gt;

&lt;p&gt;After checking what it is, run &lt;code&gt;taskkill /PID &amp;lt;pid&amp;gt; /T /F&lt;/code&gt;. &lt;code&gt;/T&lt;/code&gt; also ends its child processes, which matters for npm and npx wrappers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does the port show as used by wslrelay.exe?
&lt;/h3&gt;

&lt;p&gt;A server inside WSL 2 is listening on that port, and Windows forwards localhost traffic to it through wslrelay.exe. Stop the server inside WSL, or run &lt;code&gt;wsl --shutdown&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do I get EACCES on a port nothing is using?
&lt;/h3&gt;

&lt;p&gt;The port is probably in a range Windows reserved. Check with &lt;code&gt;netsh interface ipv4 show excludedportrange protocol=tcp&lt;/code&gt; and pick a port outside those ranges.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://rigsweep.com/guides/port-already-in-use-windows/" rel="noopener noreferrer"&gt;rigsweep.com&lt;/a&gt;. RigSweep is free and MIT-licensed; issues and ideas are welcome on &lt;a href="https://github.com/yobotn/rigsweep" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>node</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why Claude Code and MCP servers keep running on Windows after you close the terminal</title>
      <dc:creator>RIGSWEEP.COM</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:49:06 +0000</pubDate>
      <link>https://dev.to/rigsweep/why-claude-code-and-mcp-servers-keep-running-on-windows-after-you-close-the-terminal-2f3d</link>
      <guid>https://dev.to/rigsweep/why-claude-code-and-mcp-servers-keep-running-on-windows-after-you-close-the-terminal-2f3d</guid>
      <description>&lt;p&gt;&lt;strong&gt;On Windows, a process keeps running when the process that started it exits.&lt;/strong&gt; So when you close a terminal, or an agent CLI like Claude Code exits, the MCP servers, dev servers and test runners it started can stay alive, holding RAM, CPU and ports. You can find them with Task Manager or PowerShell and end them with &lt;code&gt;taskkill /PID &amp;lt;pid&amp;gt; /T /F&lt;/code&gt; after checking what they are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it happens
&lt;/h2&gt;

&lt;p&gt;Windows doesn't end a process when its parent exits. Closing a console window signals the programs attached to that console, but processes started in the background, detached or with their own hidden window get no signal. Agent CLIs and many dev tools start MCP servers, watchers and long commands that way. A child only ends with its parent if the launcher put both in a job object set to end them together, and most dev tools don't. Common ways it happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You close the terminal window or tab.&lt;/strong&gt; A dev server, watcher or MCP server running in the background or in its own hidden window keeps running.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The agent CLI exits but its MCP servers don't.&lt;/strong&gt; Claude Code starts each stdio MCP server as a child process. If the CLI exits abnormally, or a server was started through a wrapper such as &lt;code&gt;cmd /c npx&lt;/code&gt;, the real server process can outlive it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An agent command times out.&lt;/strong&gt; A long build or test run that the agent moved to the background can keep running after the session ends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ctrl+C stops only the wrapper.&lt;/strong&gt; With &lt;code&gt;npm run dev&lt;/code&gt; or &lt;code&gt;npx&lt;/code&gt;, you stop npm or the &lt;code&gt;cmd&lt;/code&gt; launcher, but a child that ignores the signal or was started detached keeps the port.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are known, reported problems. Some public reports, with their status in November 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/anthropics/claude-code/issues/92583" rel="noopener noreferrer"&gt;anthropics/claude-code#92583&lt;/a&gt; (open): on Windows, Bash tool commands moved to the background on timeout are not cleaned up when the session ends.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/anthropics/claude-code/issues/84464" rel="noopener noreferrer"&gt;anthropics/claude-code#84464&lt;/a&gt; (closed): on Windows, a stopped background task's shell was ended but its process tree kept running.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/anthropics/claude-code/issues/66151" rel="noopener noreferrer"&gt;anthropics/claude-code#66151&lt;/a&gt; (closed): Stop hook commands on Windows left orphan child processes when Claude Code ended abnormally.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/anthropics/claude-code/issues/1935" rel="noopener noreferrer"&gt;anthropics/claude-code#1935&lt;/a&gt; (open, reported on macOS): MCP servers not terminated when Claude Code exits.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/modelcontextprotocol/typescript-sdk/issues/2023" rel="noopener noreferrer"&gt;modelcontextprotocol/typescript-sdk#2023&lt;/a&gt; (open): closing a stdio transport signals only the direct child, so a server started through &lt;code&gt;npx&lt;/code&gt; or &lt;code&gt;uvx&lt;/code&gt; can be orphaned. On Windows, Node's &lt;code&gt;ChildProcess.kill()&lt;/code&gt; doesn't end the process tree.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to see what's still running
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Task Manager
&lt;/h3&gt;

&lt;p&gt;Open Task Manager (Ctrl+Shift+Esc), go to &lt;strong&gt;Details&lt;/strong&gt;, and sort by name. Right-click a column header, choose &lt;strong&gt;Select columns&lt;/strong&gt; and add &lt;strong&gt;Command line&lt;/strong&gt;. Look for &lt;code&gt;node.exe&lt;/code&gt;, &lt;code&gt;python.exe&lt;/code&gt;, &lt;code&gt;uv.exe&lt;/code&gt;, &lt;code&gt;bun.exe&lt;/code&gt; or &lt;code&gt;claude.exe&lt;/code&gt; rows whose command line names an MCP server, a dev server or a project you closed.&lt;/p&gt;

&lt;h3&gt;
  
  
  tasklist
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="n"&gt;tasklist&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;FI&lt;/span&gt; &lt;span class="s2"&gt;"IMAGENAME eq node.exe"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  PowerShell: list orphans
&lt;/h3&gt;

&lt;p&gt;Each process records the ID of its parent. When that parent is gone, the process is an orphan. This lists Node and Python processes whose parent no longer exists, with their command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$all&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;CimInstance&lt;/span&gt; &lt;span class="nc"&gt;Win32_Process&lt;/span&gt;
&lt;span class="nv"&gt;$alive&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; @&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$all&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$alive&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ProcessId&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nv"&gt;$all&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Where&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;$_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s1"&gt;'node.exe'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'python.exe'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'uv.exe'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'bun.exe'&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nv"&gt;$alive&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ParentProcessId&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="nc"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;ProcessId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CreationDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CommandLine&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Format&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;List&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows reuses process IDs, so a parent ID can point to an unrelated newer process. If a row looks wrong, compare the &lt;code&gt;CreationDate&lt;/code&gt; of the parent and the child: a real parent started first.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which process holds a port
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat -ano &lt;span class="o"&gt;|&lt;/span&gt; findstr :3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last column is the PID. The &lt;a href="https://rigsweep.com/guides/port-already-in-use-windows/" rel="noopener noreferrer"&gt;port 3000 guide&lt;/a&gt; covers this in more detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  The manual fix
&lt;/h2&gt;

&lt;p&gt;First check what the process is. Ending the wrong &lt;code&gt;node.exe&lt;/code&gt; can close an editor's language server or a tool you still use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;CimInstance&lt;/span&gt; &lt;span class="nc"&gt;Win32_Process&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;Filter&lt;/span&gt; &lt;span class="s2"&gt;"ProcessId = 12345"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Select&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ParentProcessId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;CommandLine&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the command line shows a leftover MCP server or dev server, end it together with its children:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="n"&gt;taskkill&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;PID&lt;/span&gt; &lt;span class="mi"&gt;12345&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;T&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;F&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/T&lt;/code&gt; ends the whole tree below that PID and &lt;code&gt;/F&lt;/code&gt; forces it. Unsaved state in that process is lost, and there is no undo. Skip processes whose command line points into VS Code, Cursor or another editor's folder, and processes run by pm2 or forever on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  How RigSweep does it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://rigsweep.com/" rel="noopener noreferrer"&gt;RigSweep&lt;/a&gt; is a free, open-source Windows app that does the steps above for you. Its Dev Cleanup tab groups each dev server, build daemon, MCP server and agent CLI with its whole process tree, project folder, age, RAM and listening ports.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwc4xnumgz40ex2fdsiff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwc4xnumgz40ex2fdsiff.png" alt="RigSweep Dev Cleanup: leftover dev servers, MCP servers and agent CLIs grouped by project, with age, RAM and ports" width="800" height="529"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Dev Cleanup groups each leftover process tree with its project, age, RAM and ports.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Case&lt;/th&gt;
&lt;th&gt;What RigSweep does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Orphan (its terminal or launcher is gone)&lt;/td&gt;
&lt;td&gt;Pre-selected, even when it still holds a port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP server&lt;/td&gt;
&lt;td&gt;Tagged as an MCP server; an older copy of a server that also runs under your current session is marked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Idle agent session in an open terminal&lt;/td&gt;
&lt;td&gt;Listed, never pre-selected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pm2 or forever daemon and the apps it runs&lt;/td&gt;
&lt;td&gt;Listed as managed, never pre-selected or auto-ended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Process owned by VS Code, Cursor, JetBrains or Visual Studio&lt;/td&gt;
&lt;td&gt;Locked, can't be ended from RigSweep&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WSL 2 / Docker VM&lt;/td&gt;
&lt;td&gt;Shut down with &lt;code&gt;wsl --shutdown&lt;/code&gt;, never pre-selected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;After a sweep&lt;/td&gt;
&lt;td&gt;Shows the RAM it got back and CPU before and after, measured&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Nothing is ended until you click, and RigSweep checks for PID reuse before every kill. &lt;a href="https://github.com/yobotn/rigsweep/releases/latest" rel="noopener noreferrer"&gt;Download RigSweep&lt;/a&gt; (Windows 10 and 11, MIT license).&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does Claude Code leave node.exe processes running on Windows?
&lt;/h3&gt;

&lt;p&gt;Windows doesn't end child processes when their parent exits. MCP servers, dev servers and test runners that Claude Code or your terminal started keep running if the CLI or terminal closes before they are stopped.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is it safe to end all node.exe processes?
&lt;/h3&gt;

&lt;p&gt;No. Some belong to your editor (language servers), to tools you run on purpose with pm2, or to a dev server you still use. Check each command line first, then end only the leftovers with &lt;code&gt;taskkill /PID &amp;lt;pid&amp;gt; /T /F&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I find orphaned processes on Windows?
&lt;/h3&gt;

&lt;p&gt;In PowerShell, list processes with &lt;code&gt;Get-CimInstance Win32_Process&lt;/code&gt; and keep those whose &lt;code&gt;ParentProcessId&lt;/code&gt; no longer exists. Because Windows reuses process IDs, compare creation times when a result looks wrong.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does RigSweep end processes automatically?
&lt;/h3&gt;

&lt;p&gt;Only if you turn on auto-cleanup in Settings, which is off by default. Even then, agent CLIs, the WSL/Docker VM, editor-owned processes and pm2 or forever apps are never auto-ended.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://rigsweep.com/guides/claude-code-leftover-processes-windows/" rel="noopener noreferrer"&gt;rigsweep.com&lt;/a&gt;. RigSweep is free and MIT-licensed; issues and ideas are welcome on &lt;a href="https://github.com/yobotn/rigsweep" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>ai</category>
      <category>node</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
