[BUG] VS Code extension hangs with "JavaScript heap out of memory" after extended use

Resolved 💬 3 comments Opened Dec 1, 2025 by donmahr Closed Dec 5, 2025

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?

Title:
VS Code extension hangs with "JavaScript heap out of memory" after extended use

Body:
Environment Info

Platform: macOS (Apple Silicon)
Claude Code version: 2.0.55
VS Code version: 1.106.3
Node version: v23.1.0
Installation: npm-global

Bug Description
The Claude Code VS Code extension becomes unresponsive after extended use. The UI shows "Unfurling..." indefinitely and never completes requests. No output appears in the Claude Code output channel when this happens.
The CLI works perfectly (claude -p "say hello" responds immediately), confirming authentication and API connectivity are fine. The issue is isolated to the VS Code extension.
Console Errors
Developer Tools console shows:
[39760:0x13c00330000] Mark-Compact (reduce) 2159.0 (2193.6) -> 2159.0 (2191.9) MB
OOM error in V8: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Extension host (LocalProcess pid: 39760) terminated unexpectedly. Code: 5, Signal: unknown
Also seeing:
[ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found
[ERROR] Failed to save config with lock: Error: Lock file is already being held

Workarounds Found

Disabling GitHub Copilot Chat, OpenAI ChatGPT, and MongoDB extensions reduces frequency
Reloading VS Code window temporarily resolves the hang
CLI in integrated terminal works reliably as alternative

What Should Happen?

Expected Behavior
Extension should remain responsive during extended use without memory exhaustion.
Additional Context
The extension appears to have a memory leak that causes heap exhaustion over time. Running with --max-memory=8192 did not resolve the issue.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

Open VS Code with Claude Code extension
Use the extension normally for several hours
Extension becomes unresponsive, stuck on "Unfurling..."
Reloading window (Developer: Reload Window) temporarily fixes it
Issue recurs after continued use

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.55

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗