[BUG] Severe Resource Leak: 760GB Storage and 15GB RAM consumed after Sleep Mode
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 leaving a Claude Code session open overnight and putting the laptop into sleep mode, I discovered that the session had consumed 760GB of disk space and approximately 15GB of memory by the morning. The terminal remained open but the system was nearly unresponsive due to the extreme disk and memory pressure.
What Should Happen?
Claude Code should remain idle or enter a suspended state without continuous resource consumption during system sleep.
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session (CLI).
- Complete a set of tasks/interactions.
- Keep the terminal window active after the agent is done.
- Put the laptop into Sleep Mode overnight (for around 10 hours).
- Wake the laptop and observe system resource usage (Activity Monitor/Task Manager and disk utility).
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.128
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
I used git bash as a terminal, also I have generated a heap dump using /heapdump which is available upon request for the engineering team. I had to manually clear the storage to regain control of my machine.
The huge file was stored under: %TEMP%\claude\<File-Path>\c9943489-d117-4eef-ae91-59785be1ed40\tasks\bpjcyiac0.output
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗