Problem Description
Claude CLI (claude/claude-trace) processes encounter "out of memory" errors during execution, causing failures on large codebases or complex operations.
Error Example
<--- Last few GCs --->
[12980:0x148008000] 94508806 ms: Scavenge (interleaved) 3198.3 (3230.8) -> 3198.3 (3230.8) MB
[12980:0x148008000] 94512102 ms: Mark-Compact 4090.2 (4122.7) -> 4086.0 (4137.1) MB
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Root Cause
Node.js default heap size (1.4-1.7 GB) is insufficient for Claude CLI's memory requirements during intensive operations.
Solution
Set NODE_OPTIONS environment variable to allocate 8GB heap memory before launching claude/claude-trace processes.
Requirements
- Set NODE_OPTIONS=--max-old-space-size=8192 (8GB) before launching Claude
- Apply to both launch() and launch_interactive() methods in ClaudeLauncher
- Ensure environment variable is passed to subprocess
Success Criteria
Labels
Problem Description
Claude CLI (claude/claude-trace) processes encounter "out of memory" errors during execution, causing failures on large codebases or complex operations.
Error Example
Root Cause
Node.js default heap size (1.4-1.7 GB) is insufficient for Claude CLI's memory requirements during intensive operations.
Solution
Set NODE_OPTIONS environment variable to allocate 8GB heap memory before launching claude/claude-trace processes.
Requirements
Success Criteria
Labels