⌨️CLAUDE_CODE_TOOL_MEMORY_LIMIT
Also known as CLAUDE_CODE_TOOL_MEMORY_LIMIT environment variable
It caps how much memory Claude's commands can use.
Think of it like
It is like a big game on a small table. It may only use part of it.
Example
Jack's build once ate all his memory and froze the laptop. He sets a 4G cap, so a runaway command is stopped first.
Why it matters
One command that eats all the memory can freeze the whole machine.
Definition
Example code
bash
export CLAUDE_CODE_TOOL_MEMORY_LIMIT=4G
claudeCommon mistake
Key takeaways
- 1Size like 4G. Or bytes.
- 20 or off. No cap.
- 3Linux and WSL. Next start.