VS Code extension crashes with OOM (2GB+ memory usage)

Status Fixed / completed
Reported on v2.1.31
Maintainer reply None cached
Activity 3 comments · opened Feb 4, 2026 · closed Feb 4, 2026

Description

The Claude Code VS Code extension crashes repeatedly with JavaScript heap out of memory errors. The extension consumes 2GB+ of memory and triggers V8 OOM errors, causing the extension host to terminate unexpectedly.

Environment

  • VS Code Version: 1.108.2
  • Extension Version: 2.1.31
  • OS: macOS Darwin 25.2.0 (arm64)
  • CLI Version: 2.1.31

Error Messages

<--- Last few GCs --->
[6036:0x11400380000] 18175 ms: Mark-Compact 2073.3 (2076.8) -> 2073.3 (2076.8) MB, pooled: 0.0 MB, 298.89 / 0.00 ms (average mu = 0.104, current mu = 0.001) allocation failure; GC in old space requested
[6036:0x11400380000] 18323 ms: Mark-Compact (reduce) 2073.3 (2076.8) -> 2073.3 (2076.8) MB, pooled: 0.0 MB, 148.44 / 0.00 ms (average mu = 0.069, current mu = 0.000) last resort; GC in old space requested

ERROR:electron/shell/common/node_bindings.cc:181] OOM error in V8: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Extension host (LocalProcess pid: 6036) terminated unexpectedly. Code: 5, Signal: unknown
Extension host terminated unexpectedly. The following extensions were running: Anthropic.claude-code

Steps to Reproduce

  1. Open VS Code with the Claude Code extension installed
  2. Open a workspace
  3. Open Claude Code panel and send a simple message like "hello"
  4. Extension host crashes with OOM after ~18 seconds

Attempted Workarounds

  1. Isolating to separate extension host via extensions.experimental.affinity: Still crashes - the extension itself uses 2GB+
  2. Terminal mode (claudeCode.useTerminal: true): This works as a workaround

Additional Context

  • The crash occurs even when Claude Code is the only extension running in its isolated extension host
  • The CLI version works perfectly fine - only the VS Code webview-based UI has this issue
  • Memory climbs to ~2073 MB before crashing

Expected Behavior

The extension should not consume 2GB+ of memory for basic operations.

---
🤖 Generated with Claude Code

View original on GitHub ↗

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