How many idle Claude Code sessions do you leave open, and have you checked what they cost in RAM?
retained text
I run several Claude Code sessions in parallel on one dev box, and sessions start other sessions for side tasks. I'm bad at closing them. In July the kernel OOM killer fired five times in four days. It wasn't any of my containers. Every single time, the process it killed was a Claude Code binary with 19-24 GB resident. In October the box (30 GB RAM) froze for the third time in three days. When I dug in, sessions that had been sitting idle for days were using about 14 GB between them. Nothing was happening in them, they were just open. So I archived 185 sessions that had been idle more than 3 days and stopped 12 old services. Free memory went from 2.0 GB to 10.5 GB. When you run a lot of agents, the sessions themselves end up being the biggest tenant on the machine, and nobody ever closes them. How many sessions do you usually leave running, and have you actually measured how much memory they're holding?
document fetched 2026-11-07 00:38 · canonical https://reddit.com/r/ClaudeCode/comments/1xpksr1/how_many_idle_claude_code_sessions_do_you_leave