claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open donmahr opened this issue 4 months ago • 1 comments

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

donmahr avatar Dec 01 '25 17:12 donmahr


Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12611
  2. https://github.com/anthropics/claude-code/issues/8722
  3. https://github.com/anthropics/claude-code/issues/12382

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code


github-actions[bot] avatar Dec 01 '25 17:12 github-actions[bot]

This issue has been automatically closed as a duplicate of #12611.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 05 '25 09:12 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Dec 13 '25 14:12 github-actions[bot]