You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #952
just came here to say I get this doing some file renaming tasks. I use Claude Code a ton for coding, no problems, but tried to rename a bunch of files and get this error every time.
Happy to provide logging or whatever if it would help!
Claude Code has a memory leak or an infinite loop - the corresponding node process just fills up the whole heap (be it 8GB or more) when saving the file and then crashes with the error OP posted.
I've tried: node --max-old-space-size=8192 $(which claude), but it didn't help.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
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.
Activity
mikehearn commentedon May 4, 2025
As a workaround you could try using GraalNodeJS: https://www.graalvm.org/
It's an alternative to Node that runs on the JVM. Claude Code will start up slower, but will be able to handle bigger heaps than Node can.
pj4533 commentedon May 17, 2025
just came here to say I get this doing some file renaming tasks. I use Claude Code a ton for coding, no problems, but tried to rename a bunch of files and get this error every time.
Happy to provide logging or whatever if it would help!
pj4533 commentedon May 18, 2025
Here is the stack trace I get:
ulshv commentedon Jun 4, 2025
Claude Code has a memory leak or an infinite loop - the corresponding
nodeprocess just fills up the whole heap (be it 8GB or more) when saving the file and then crashes with the error OP posted.I've tried:
node --max-old-space-size=8192 $(which claude), but it didn't help.ulshv commentedon Jun 4, 2025
Temporary fix:
npm i -g @anthropic-ai/claude-code@1.0.9 claude config set -g autoUpdaterStatus disabledgithub-actions commentedon Oct 10, 2025
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
github-actions commentedon Oct 17, 2025
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.