anthropics / anthropics/claude-code
[Bug] Excessive unused memory allocation causing OOM when vm.overcommit_memory=2
- Lingua principale
- Python
- Stelle
- 145k
- Fork
- 23.1k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
## 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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing on Linux with vm.overcommit_memory=2 using Claude Code 2.1.238 and compare virtual memory allocation to resident memory for one or more sessions. The issue does not name files or tests, so the first task is profiling where the large unused allocation comes from. Done means the CLI no longer reserves multiple extra gigabytes per session or the cause is clearly identified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- linux, python
- Ambito
- cli, performance
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100