Under the hood
Under low memory, Claude Code first sheds only monitoring-only background workers before fuller cleanup
What
When Claude Code detects it is running low on memory and hasn't yet shed any background workers, it now first runs a lighter pass that retires only workers doing monitoring work, logging "low memory, monitoring only". Only after that does it fall through to the previous, broader retirement pass that targets a wider set of workers.
Why
This gives Claude Code a gentler first response to memory pressure, freeing up monitoring-only workers before resorting to shutting down more workers than necessary.