본문 바로가기
카테고리 없음

claude cli 에서 error :JavaScript heap out of memory during execution

by 위그든씨 2026. 1. 12.

https://github.com/anthropics/claude-code/issues/14373

 

[Bug] JavaScript heap out of memory during execution · Issue #14373 · anthropics/claude-code

I got this one when Claude Code was running a subagent. Bug Description <--- Last few GCs ---> [96741:0x7f8c36a0a000] 4289231 ms: Scavenge (interleaved) 4048.3 (4078.7) -> 4042.9 (4116.9) MB, poole...

github.com

클코에서 프롬프트 날리면 답변 생성 시 힙 제한에 도달했다면서 죽어버리는 이슈가 있어서 찾아보니 동일 이슈가 올라와 있었음.

클로드의 문제라기보다 사용자의 문제 같았고, 뚜렷한 해결책 없이 메모리 제한을 늘려주라는 것 뿐이었음.

그런데도 나는 계속 죽어서 .claude/setting.json 를 보니 직전에 생성해놨던 셋팅값 문제였음.

답변 생성 시 검증을 통해 할루이네이션을 줄이고 싶어서 사용자 훅으로 아래와 같이 설정했다가 무한 루프에 빠졌던거였다...

지워주니 아주 잘 됐음. 남들은 안생기는데 나만 생기는 이슈라면 역시 내가 문제인 것으로...

  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": ".*",
        "hooks": [
          {
            "type": "prompt",
            "prompt": "Before responding, verify the following guidelines:\n\n1. Repeat critical information for clarity\n2. TO PREVENT HALLUCINATIONS:\n   - Say 'I don't know' if uncertain about the answer or process\n   - Think carefully before answering\n   - Only answer if very confident\n",
            "statusMessage": "Checking response guidelines..."
          }
        ]
      }
    ]
  },