Security-sentinel agent causes Node.js heap out of memory error
Description
The security-sentinel agent crashes with JavaScript heap exhaustion when analyzing codebases.
Error
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Full Stack Trace
[21788:0x128018000] 20583198 ms: Mark-Compact 1961.8 (2101.6) -> 1940.4 (2176.3) MB, pooled: 0 MB, 1407.42 / 0.00 ms (average mu = 0.292, current mu = 0.071) allocation failure; scavenge might not succeed
[21788:0x128018000] 20584472 ms: Mark-Compact (reduce) 1952.0 (2176.3) -> 1946.8 (2055.6) MB, pooled: 0 MB, 807.46 / 0.00 ms
----- Native stack trace -----
1: 0x101dfd8c4 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/24.3.0/bin/node]
2: 0x100afa864 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/24.3.0/bin/node]
[... truncated for brevity ...]
Environment
- Platform: macOS (Darwin 23.5.0)
- Node version: 24.3.0
- Claude Code model: claude-opus-4-1-20250805
- Working directory: /Users/Matt/myApps/write_club
Steps to Reproduce
- Have a Phoenix/Elixir codebase
- Run security-sentinel agent on the codebase
- Node.js process runs out of memory
Expected Behavior
The security-sentinel agent should handle memory efficiently when scanning codebases and not cause heap exhaustion.
Workaround
Avoid using the security-sentinel agent until the memory management issue is fixed.
Impact
This prevents security audits from being performed on the codebase using the automated agent.
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5388
- https://github.com/anthropics/claude-code/issues/1421
- https://github.com/anthropics/claude-code/issues/5253
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
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.