[BUG] Claude memory usage spiking and speed dropping to a crawl
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.63
- Operating System: macOS 15.5
- Terminal: iTerm2
Bug Description
Over the last 2-3 days, I have seen Claude slow to a complete standstill when it is performing tasks using defined sub-agents. This started happening around when I defined ten sub-agents (until then, I had been using just the general sub-agent). I don't know if that is related, or if it is simply a coincidence. I think it is a coincidence, since I have seen others mentioning weird interface bugs, but thought I would mention it.
I saw a bug reported about the ESC key resulting in the hanging of the terminal sessions - that is happening to me too. I also have seen an issue about the agent usage and sub-process spinning causing massive memory overload and have instituted the solution suggested there (https://github.com/anthropics/claude-code/issues/1970) and I am still experiencing the problem.
Steps to Reproduce
- Give Claude directions that include spinning up one or more sub-agents
- Initially, the system will appear to be functioning normally, but eventually, every single execution will take mane, many minutes, and even acknowledging and showing my input in the terminal window takes upwards of 10-20 seconds. If I press ESC, the terminal session freezes and I lose all the history of what was done in the session. I also cannot see anything that the sub-agents is doing except for what one of them needs input to allow a command or an edit/write to a file.
- I eventually end up having to quit Claude altogether if the terminal session hasn't frozen, or I need to force quit the app from the Activity Manager.
Expected Behavior
Consistent, fast, responsiveness which has been the norm for the couple of months that I have been using it.
Actual Behavior
Detailed above
Additional Context
None
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗