[BUG] High memory consumption when running Claude Code in multiple IntelliJ projects
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?
Description
Running Claude Code simultaneously in two different IntelliJ IDEA projects causes significant slowdowns and triggers the IDE memory warning: "The IDE is running low on memory and this might affect performance. Please consider increasing the heap size."
Environment
- OS: macOS 26.1 (25B78)
- Hardware: MacBook Pro M4
- IDE: IntelliJ IDEA 2025.2.5 (Ultimate Edition)
- Claude Code: 2.0.57
What Should Happen?
Claude Code should manage memory efficiently when running in multiple IDE instances without causing performance degradation or memory warnings.
Error Messages/Logs
The IDE is running low on memory and this might affect performance. Please consider increasing the heap size.
Steps to Reproduce
- Open two projects in separate IntelliJ windows
- Start Claude Code in both
- Use Claude Code in each project
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.57
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
IntelliJ IDEA terminal
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/9658
- https://github.com/anthropics/claude-code/issues/8968
- https://github.com/anthropics/claude-code/issues/12685
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
hey @smbpunt - is a recent regression for you? Are you able to reproduce the same high memory usage outside of the IDE?
I confirm the issue on windows as well. It is happening from some days. In my case happen with just one project opened and claude code running or ending operations. When it happens if I try to close claude code in intellij, a pop up window appear and tells:
"Process "Terminal Claude Code" is running. Do you want to terminate the process "terminal claude code"? Immediately when this window appear the CPU go to zero. If I close the window without terminating, the CPU will start to consume again between 80 and 100% resources.
I have 16GB ram and set the memory of intellij to 4096.
I get also the warning: The IDE is running low on memory and this might affect performance. Please consider increasing the heap size.
Here a further analysis I did, and the result is not good.
=============== ANALYSIS INFORMATION ============== Prepare files duration: 55.50 s Analysis duration: 4.616 min TOTAL DURATION: 5.546 min Temp files: heapdump = 7.32G id-mapping = 1.88G auxOffset = 472M aux = 1.98G parents = 472M sizes = 472M visited = 472M refIndex = 118M
Projects open: 1 Project 1: Module count: 1 Editors opened: 2. Counts by type:
- 1 com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl[com.jetbrains.python.PythonFileType]
- 1 com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl[com.intellij.openapi.fileTypes.PlainTextFileType]