[BUG] Desktop app memory usage grows to 3+ GB / 75-80% of system RAM, and returns immediately after a full restart
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?
<html>
<body>
<!--StartFragment--><h1 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 22px; font-weight: 580; text-rendering: optimizelegibility; line-height: 28px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 12px -4px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Desktop app memory usage grows to 3+ GB / 75-80% of system RAM, and returns immediately after a full restart</h1><p style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-weight: 500; text-rendering: optimizelegibility;">Environment:</strong></p><ul style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px 0px 0px 20px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); list-style: outside; text-rendering: optimizelegibility; gap: 6px; flex-direction: column; display: flex; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility;">Windows 11 Home (10.0.26200)</li><li style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility;">15.75 GB total system RAM</li></ul><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Summary</h2><p style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">During one long-running Claude Code session (spanning multiple days of usage on the same conversation), overall Claude memory usage grew to over 3 GB, at one point consuming 80% of total system memory (free memory dropped as low as 0.3 GB), causing the machine to become unresponsive/crash. Critically, fully quitting and relaunching the app does NOT reset this — the same high memory usage returns immediately upon reopening, rather than building up gradually over a fresh session.</p><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Key observation — this is not simply "multiple sessions open"</h2><p style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">At peak, Task Manager showed 20 total Claude-related processes using 2,439 MB, which did include multiple concurrent sessions (peaked at 7 interactive sessions confirmed via the in-app session list). But after reducing to just one active "Claude Code" session (231.8 MB, entirely reasonable), the surrounding desktop app shell still totaled ~2,928 MB across 11 other processes — including a single process alone using ~1,909.6 MB.</p><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">The restart doesn't help — this is the more important finding</h2><p style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Since the large footprint returns immediately on reopen rather than accumulating over time, this points away from a slow memory leak during use and toward something being fully reloaded into memory at startup — most likely tied to restoring a very large, long-running conversation's history/state. If that's the mechanism, session length/history size (not runtime duration) is the likely driver.</p><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Timeline of data points</h2><div class="overflow-x-auto" style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); overflow-x: auto; text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
Snapshot | Claude processes | Claude Code sessions | Total Claude memory
-- | -- | -- | --
Initial complaint | 18-20 | ~7 (concurrent) | 2,439-4,363 MB
After closing/reopening once | 13 | 2 | ~1,758 MB
Most recent check | 13 | 1 | 3,159.9 MB
After a full app restart | — | 1 | Same high usage returns immediately
</div><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Other findings</h2><ul style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px 0px 0px 20px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); list-style: outside; text-rendering: optimizelegibility; gap: 6px; flex-direction: column; display: flex; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility;">No auto-start entries anywhere (Startup folder, Registry Run keys, Scheduled Tasks) — rules out an OS-level auto-launch mechanism.</li><li style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility;">Ending individual child "Claude" processes via Task Manager causes automatic respawn while the parent is alive — the whole app has to be quit via its own Quit/Exit, not picked apart in Task Manager.</li><li style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility;">Two processes shown in Windows "Efficiency Mode" (suspended), one holding 526 MB while suspended.</li></ul><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Suspected cause</h2><p style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">The app appears to eagerly reload a large amount of state (likely full conversation/session history) back into memory on startup for a very long-running conversation, rather than loading it incrementally — meaning restarting the app provides no relief for a session this size.</p><h2 style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); font-size: 17px; font-weight: 580; text-rendering: optimizelegibility; line-height: 22px; letter-spacing: -0.01em; color: rgb(11, 11, 11); margin-block: 24px 8px; padding-block: 0px; font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Workaround</h2><p style="box-sizing: border-box; border: 0px solid color(srgb 0.0431373 0.0431373 0.0431373 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(37, 106, 191); scrollbar-width: thin; scrollbar-color: rgba(30, 30, 29, 0.35) rgba(0, 0, 0, 0); text-rendering: optimizelegibility; color: rgb(11, 11, 11); font-family: anthropic-sans, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(252, 252, 251); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">None found. Restarting the app does not reduce memory usage.</p><!--EndFragment-->
</body>
</html>
What Should Happen?
Should not have 13-20 open sessions taking up 85% of my laptops memory
Error Messages/Logs
Steps to Reproduce
<img width="676" height="516" alt="Image" src="https://github.com/user-attachments/assets/2bf57ade-68ab-4d91-9cf8-ca6b2315b771" />
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code 2.1.220
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_