VSCode extension crashes with OOM after ripgrep EAGAIN spawn failures
Resolved 💬 6 comments Opened Feb 1, 2026 by mgosha Closed Mar 3, 2026
Description
Claude Code VSCode extension crashes with exit code 1 and "Out of memory" error after repeated ripgrep spawn failures. The ripgrep failures are misreported as "20 second timeouts" when they actually fail immediately with EAGAIN.
Environment
- Claude Code version: 2.1.27
- OS: AlmaLinux 9 (RHEL-based)
- VSCode: Remote SSH session
- RAM: 31GB (25GB available)
- Project size: ~30K files, 1.1GB (Node.js monorepo with node_modules)
Steps to Reproduce
- Open a medium-to-large Node.js project via VSCode Remote SSH
- Start a Claude Code session
- Send a message that triggers file search (e.g., "Add these suggestions to the plan document file")
- Session crashes with "Claude Code process exited with code 1"
Expected Behavior
Claude should search files without crashing, or gracefully handle spawn failures.
Actual Behavior
- Ripgrep spawn fails with EAGAIN error
- Retry with single-threaded mode (-j 1)
- Immediate ABORT_ERR (not a real timeout)
- Misleading "RipgrepTimeoutError: timed out after 20 seconds" even though only milliseconds elapsed
- Eventually crashes with "RangeError: Out of memory"
Log Evidence
Ripgrep spawn failure (happens within milliseconds, not 20 seconds):
2026-02-01T08:34:12.115Z [DEBUG] rg EAGAIN error detected, retrying with single-threaded mode (-j 1)
2026-02-01T08:34:12.134Z [DEBUG] rg error (signal=undefined, code=ABORT_ERR, stderr: ), 0 results
2026-02-01T08:34:12.134Z [ERROR] "RipgrepTimeoutError: Ripgrep search timed out after 20 seconds..."
OOM crash:
2026-02-01T08:34:30.523Z [ERROR] "RangeError: RangeError: Out of memory
at unshift (unknown)
at KVH (/$bunfs/root/claude:5136:1079)
at async AC$ (/$bunfs/root/claude:5137:4346)..."
Final crash:
2026-02-01 02:34:31.011 [error] Error from Claude (on channel 50t4z00zad7): Error: Claude Code process exited with code 1
Analysis
- EAGAIN spawn failures - The ripgrep process fails to spawn (EAGAIN = "Resource temporarily unavailable"), but this is incorrectly reported as a timeout
- Memory leak in retry loop - The repeated spawn/retry cycle appears to leak memory until OOM
- Timestamps prove no timeout - The "20 second timeout" errors occur within milliseconds of the EAGAIN errors
Additional Context
- There was also a plugin marketplace cache corruption:
fatal: Cannot rebase onto multiple branches - The project has a proper
.gitignoreexcludingnode_modules/ - System has 524288 open file limit and unlimited virtual memory
Workaround
Created a .claudeignore file to reduce scan scope:
node_modules/
dist/
.wrangler/
.git/
And cleaned up corrupted plugin cache:
rm -rf ~/.claude/plugins/marketplaces/claude-plugins-officialThis issue has 6 comments on GitHub. Read the full discussion on GitHub ↗