[Bug] Excessive unused memory allocation causing OOM when vm.overcommit_memory=2
Status Open
Reported on v2.1.238
Maintainer reply None cached
Activity 0 comments · opened Sep 6, 2026
Bug Description
Claude code overcommits memory. By a significant margin. Actual memory usage per claude code session is typically ~0.5G but multiple gigabytes of memory are allocated per claude code session/process. With vm.overcommit_memory set to 2 on my laptop (16G RAM + 24G swap, which is simply not enough when claude decides to start compiling a ton of things in parallel, immediate crashes are more obvious and easier to diagnose than hangs), that causes issues.
Environment Info
- Platform: linux
- Terminal: custom (alacritty-based)
- Version: 2.1.238
- Feedback ID: 4e73b112-c464-4bc3-bc92-f4d4777b39d4