[BUG] VSCode Extension 2.1.20 - Critical Memory Leak: 11.6GB per conversation window on macOS
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?
What's Wrong?
The Claude Code VSCode extension version 2.1.20 (released January 27, 2026) has a critical memory leak. Opening a single new conversation window immediately spawns two "claude" processes, each consuming approximately 11.6GB of RAM (23.2GB total).
Environment
- Extension Version: 2.1.20
- VS Code Version: 1.108.2 (Universal)
- Operating System: macOS
- System RAM: 24GB physical memory
- Issue Start Date: January 27, 2026 (same day as 2.1.20 release)
Steps to Reproduce
- Install Claude Code extension version 2.1.20 from VSCode Marketplace
- Open VSCode
- Click to open a new Claude Code conversation window
- Open Activity Monitor (macOS)
- Observe two "claude" processes immediately appearing
Expected Behavior
- Processes should use approximately 200-400MB each (as in previous versions like 2.1.16)
- Total memory usage should remain under 1GB for a new conversation window
Actual Behavior
- Two "claude" processes spawn immediately
- Each process consumes ~11.6GB RAM
- Total memory consumption: ~23.2GB
- System becomes nearly unusable
- Swap usage increases to 10GB+
- Memory pressure becomes critical (red zone)
- Example PIDs: 2399 and 2384
Screenshots
Activity Monitor showing memory usage:
- Process name: "claude"
- Memory per process: 11.60 GB and 11.59 GB
- Total system memory used: 19.37 GB / 24.00 GB
- Swap used: 10.04 GB
<img width="735" height="177" alt="Image" src="https://github.com/user-attachments/assets/f543e4e0-034d-47bd-a238-6f723ede73c2" />
]
Process Details
Running ps aux | grep -i claude shows:
kefei 11376 1.1 1.0 1865763536 263472 ?? S 4:58PM 0:19.58 /Applications/Claude.app/Contents/MacOS/Claude
Multiple Claude Helper (Renderer) processes are spawned, but the main issue is the two processes consuming 11.6GB each.
Additional Context
- Version 2.1.16 worked perfectly - this is a regression specific to version 2.1.20
- Problem occurs immediately upon opening a conversation window
- No active conversation needed to trigger the leak
- Problem occurs before any user input or interaction
- Affects all projects and workspaces
- The memory leak appears instantly, not gradually
- Closing the conversation window does not free the memory - processes must be manually killed
Workaround
Rolling back to version 2.1.16 completely resolves the issue:
- Open VSCode Extensions
- Click the gear icon next to Claude Code
- Select "Install Another Version..."
- Choose version 2.1.16
- Click the gear icon again and select "Disable Auto Update"
After rollback, memory usage returns to normal (~200-400MB per process).
Impact
This bug makes the VSCode extension completely unusable:
- Consumes all available system memory instantly
- Forces system into swap, making everything extremely slow
- Requires manual process termination to recover
- Prevents any productive use of Claude Code in VSCode
Related Issues
This appears to be related to but more severe than:
- #16508 - Memory leak in closed session tabs (~400MB per session)
- #20777 - Memory leak on Linux (20GB+)
- #20696 - macOS IDE memory issue
However, the severity in 2.1.20 is significantly worse - 11.6GB per process vs. the 400MB-3GB reported in other issues.
Request
Given the severity of this issue and that it affects the latest release, could the team:
- Investigate the 2.1.20 release for regression
- Consider rolling back 2.1.20 or releasing a hotfix 2.1.21
- Provide guidance on recommended version until fixed
Thank you for your attention to this critical issue.
What Should Happen?
What Should Happen?
When opening a new Claude Code conversation window in VSCode, the extension should:
- Normal Memory Usage: Claude processes should consume approximately 200-400MB of RAM each, similar to version 2.1.16
- Stable Performance: The system should remain responsive with no significant impact on available memory
- No Memory Leaks: Memory usage should remain stable and not grow unboundedly
- Reasonable Resource Consumption: Total Claude Code memory footprint should stay under 1GB for a new, empty conversation window
The extension should initialize and be ready to use without causing system memory pressure or requiring swap usage.
Error Messages/Logs
Steps to Reproduce
- Install Claude Code extension version 2.1.20 from VSCode Marketplace
- Launch Visual Studio Code (Version 1.108.2)
- Open any project or workspace (the issue occurs with all projects)
- Click the Claude Code icon to open a new conversation window
- Open macOS Activity Monitor (Applications → Utilities → Activity Monitor)
- Sort processes by Memory usage
- Observe two "claude" processes immediately appearing, each consuming ~11.6GB RAM
Note: The memory leak occurs instantly upon opening the conversation window, before any user interaction or conversation begins. The issue is 100% reproducible.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.15
Claude Code Version
2.1.20
Platform
Other
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗