[BUG] VS Code extension leaks processes on /clear + new chat (native Windows), causing pagefile to consume 11+ GB disk space
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude Code VS Code extension does not terminate worker processes when using /clear and starting new chats. On native Windows, orphaned processes accumulate silently, consuming all available RAM and forcing Windows to expand the pagefile (virtual memory file on disk), which consumed 11+ GB of disk space in a single day.
I was using /clear as recommended to reset context between tasks, then starting new chats in the same VS Code extension panel. After a normal day of work, I discovered 27 orphaned Claude processes consuming ~5.2 GB of RAM on a 16 GB machine (83% memory usage). Windows compensated by expanding pagefile.sys to 20.3 GB, eating my free disk space from ~20 GB down to 9 GB.
Same root cause as #15906 (Linux), #26987 (WSL2), and #14446 (macOS), but on native Windows with an additional consequence: pagefile expansion silently consuming disk space.
Process evidence (27 orphaned processes):
ProcessName MemMB
----------- -----
claude 420
claude 410
claude 390
claude 295
claude 234
claude 227
claude 225
claude 224
claude 216
claude 213
claude 200
claude 191
claude 190
claude 171
claude 169
claude 154
claude 152
claude 149
claude 147
claude 143
claude 139
claude 138
claude 131
claude 121
claude 115
claude 112
claude 103
Total: ~5,200 MB across 27 processes
pagefile.sys was the largest file modified in the last 12 hours at 20.3 GB.
What Should Happen?
When /clear is used or a new chat is started, worker processes from the previous chat should be terminated. Only processes for the active chat should remain running.
Error Messages/Logs
No error messages displayed. The processes leak silently.
Disk space scan showing pagefile as top file modified in last 12 hours:
SizeMB LastWriteTime FullName
------ ------------- --------
20346.5 27/02/2026 20:57:13 C:\pagefile.sys
Memory at time of discovery: 13.1/15.8 GB (83%) per Task Manager.
Steps to Reproduce
- Open VS Code with Claude Code extension on native Windows
- Start a chat and work on a task
- Use /clear to reset context
- Start a new chat in the same panel
- Repeat steps 3-4 several times throughout the day
- Run: Get-Process -Name claude
- Observe orphaned processes accumulating with each /clear cycle
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v2.1.61
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Workaround: Periodically run Get-Process -Name claude and Stop-Process -Name claude -Force. Fully closing VS Code also clears processes. Reboot required to shrink pagefile.
Related issues:
#15906 — VS Code extension leaks worker processes when creating new chats (Linux)
#26987 — VS Code extension leaks processes when closing tabs/panels (WSL2)
#14446 — VS Code extension orphaned processes (macOS)
#24207 — No disk space management (Windows)
#15423 — Claude Desktop leaves orphaned renderer processes (Windows)
Environment: Windows 11, 15.8 GB RAM, Intel i7-8550U, no WSL.
<img width="207" height="60" alt="Image" src="https://github.com/user-attachments/assets/fdc812ce-a0c1-4610-a66c-112b609051c7" />
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗