Extension host crashes (OOM) when loading large conversation history

Resolved 💬 3 comments Opened Feb 11, 2026 by codybrom Closed Feb 11, 2026

Bug Report

Description

Claude Code extension causes VS Code extension host to crash with exit code 5 (OOM) when the project has accumulated large conversation history files. The extension attempts to load all conversation .jsonl files into memory at startup, exhausting the V8 heap and crashing the extension host.

Environment

  • Claude Code: v2.1.39
  • VS Code: 1.109.2 (arm64)
  • OS: macOS 26.2 (Darwin arm64)

Reproduction

  1. Use Claude Code extensively over time, accumulating large conversation files in ~/.claude/projects/{project}/
  2. Accumulate 30+ conversation files with several over 20MB (in this case: 508MB, 49MB, 26MB, etc.)
  3. Open VS Code with Claude Code extension enabled
  4. Extension host crashes ~20-30 seconds after startup

Observed Behavior

Extension host crashes with:

[Extension Host] [FileSystemService] file:///.../c236d482-96f3-4a37-986a-9244e9225832.jsonl is a LARGE file (508MB > 5MB)
<--- Last few GCs --->
[82010:0x10400380000] 26944 ms: Scavenge 3681.5 (3747.9) -> 3653.6 (3732.2) MB, pooled: 0.0 MB, 4.62 / 0.00 ms
[82010:0x10400380000] 27004 ms: Scavenge 3696.2 (3762.5) -> 3669.8 (3762.4) MB, pooled: 0.0 MB, 6.57 / 0.00 ms
[82010:0211/105128.382687:ERROR:electron/shell/common/node_bindings.cc:181] OOM error in V8: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory

Main log shows:

Extension host with pid 82010 exited with code: 5, signal: unknown.
[UtilityProcess id: 9, type: extensionHost, pid: 82010]: crashed with code 5 and reason 'crashed'

Expected Behavior

Claude Code should either:

  1. Lazy load conversations - only load conversation metadata at startup, defer full content loading until needed
  2. Archive old conversations automatically - move conversations older than N days to an archive subfolder
  3. Respect heap limits - stream/paginate conversation loading rather than loading all into memory
  4. Warn users - notify when conversation history exceeds safe memory threshold

Workaround

Archive large conversation files manually:

mkdir -p ~/.claude/projects/{project}/archive
mv ~/.claude/projects/{project}/*.jsonl ~/.claude/projects/{project}/archive/
# Move back only recent conversations as needed

After archiving 8 conversations (totaling 600+MB), extension host stabilized.

Impact

  • Severity: Critical - extension completely unusable with accumulated history
  • Scope: Affects long-term Claude Code users with extensive conversation history
  • Misleading symptoms: Crashes were initially attributed to other extensions (GitHub Copilot Chat) during bisect, wasting hours of debugging

Additional Notes

The issue manifested during extension bisect as false positives because:

  1. Claude Code loads conversation history during activation
  2. When bisect disables half the extensions, memory pressure changes slightly
  3. This creates non-deterministic crash timing that appears correlated with other extensions
  4. Makes root cause analysis extremely difficult without checking heap usage

This appears to be a design issue where conversation history loading was not tested with real-world long-term usage patterns.

View original on GitHub ↗

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