[BUG] Rapid Accumulation of Claude Code TUI Heap Memory Utilization [100s of Mbs/sec] (2.1.73-->2.1.74) (Auto-updater Issue?)
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?
Chats that sit idle begin to accumulate memory very fast. Seemingly, a gigabyte every ten seconds or so for some respective parallel terminal running instances of the app.
One thing I did notice is that when this all seems to be accelerating in parallel, there is, in one of my respective terminals, a notice that it failed to auto update. Perhaps this is a respective error when the application is already up to date, and then there's some type of background process that is in a race condition or infinite loop trying to update so the memory goes asymptotic.
<img width="419" height="151" alt="Image" src="https://github.com/user-attachments/assets/e161cf56-ccef-4df8-b49d-26fa2d9040f8" />
What Should Happen?
I assume it should automatically be clearing the heap?
Error Messages/Logs
The status line throws an issue for "High Memory Usage (##GB) • /heapdump"
Could understand this being the case if there was actually a high memory usage chat, but most of them are new chats with barely any chat history, that all seemed to be just rapidly accumulating memory without clearing it.
Steps to Reproduce
I honestly don't know. I wish I had better information for you. It seems like there could be better telemetry on this. I cannot find the logs that would be indicative of this. Like I said, the only thing that I did notice is that this has happened anecdotally now basically since 2.1.5* (where I first saw the /heapdump statusline msg)
I do have to note that my computer did crash because of this, which is very unfortunate.
Hope you guys can get this fixed. We'll post here if I see the issue again.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.73
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗