Claude Code spawns child processes (Bun/Node) for Task tool subagents and MCP servers. When a session ends or crashes, these get reparented to PID 1 (init/launchd) and are never cleaned up. Over hours/days, hundreds accumulate — consuming RAM, causing swap thrashing, and crashing your machine.
This is a workaround until Anthropic fixes the upstream bug.