[BUG] Long-Running Sessions No Longer Suspend Properly, Consume Excessive CPU/RAM Since 2.0/2.05
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After upgrading to Claude Code 2.0 and now 2.05, long-running/persistent sessions no longer suspend properly and consume excessive CPU and RAM. I regularly keep long sessions open, which worked fine in previous versions. Now I observed 25 Claude processes with severe resource issues: two actively consuming massive CPU (131% and 96%), and a zombie process with 1,054 hours of CPU time. Memory usage is extreme: 14GB active, 13.8GB inactive, totaling ~28GB. The sessions either don't suspend when idle or continue eating resources even when not actively in use.
What Should Happen?
Long-running sessions should suspend properly when idle and not consume CPU or excessive memory. Previous versions (pre-2.0) handled persistent sessions correctly - they would suspend when not actively in use. Sessions should not become zombies with 1000+ hours of CPU time. Resource usage should be proportional to active usage, with idle sessions consuming minimal resources.
Error Messages/Logs
Zombie process PID 80858: 1,054h CPU time (43+ days)
Active processes consuming excessive CPU:
- PID 92280: 131% CPU (current session)
- PID 90462: 96% CPU (another active session)
- PID 80858: 9% CPU (zombie with 1054h runtime)
Memory in use: ~28GB total
- Active: 14GB
- Inactive: 13.8GB
Session breakdown: 10 CLI sessions + Desktop app + 10 helper processes
- 7 CLI sessions were idle but not suspended
Steps to Reproduce
- Upgrade Claude Code to version 2.0 or 2.05
- Start multiple CLI and/or Desktop sessions
- Leave sessions running for extended periods (days/weeks)
- Observe that idle sessions do not suspend and continue consuming high CPU/memory
- Zombie processes accumulate excessive CPU time without terminating
- Manual intervention (killing processes) required to restore performance
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v1.0.126
Claude Code Version
2.05
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
I have kept persistent/long sessions before without any issues - this is NOT about having multiple sessions open. The problem is specifically that these sessions are not suspending or managing resources properly since the 2.0 update. I've already killed the problematic processes, but this behavior is a regression from previous versions where long-running sessions would suspend and not consume resources when idle. Happy to try and look for additional logs or run diagnostic commands if this reoccurs.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗