warp icon indicating copy to clipboard operation
warp copied to clipboard

Critical Memory Leak: Warp Terminal consuming 3.6GB RAM (90% of system memory)

Open Oskar-Andersson opened this issue 1 year ago • 20 comments

Pre-submit Checks

Describe the bug

Critical Memory Leak - System Performance Degradation

Summary

Warp Terminal process consumed 3.6GB of system RAM (90% of available memory), causing severe system performance issues and near-complete system freeze.

Version

v0.2025.09.17.08.11.stable_02

Environment

  • OS: DietPi (Debian GNU/Linux 13.1 trixie)
  • Kernel: Linux 6.12.43+deb13-amd64
  • Architecture: x86_64
  • RAM: 3.9GB total
  • Shell: bash 5.2.37
  • Warp Installation: /opt/warpdotdev/warp-terminal/
  • Process Path: warp-terminal

Issue Details

Memory Usage (Critical):

  • Warp Process: 3,628,752 KB (3.6GB) RSS memory
  • System Impact: 97% RAM utilization (only 105MB free)
  • CPU Impact: kswapd0 at 19% CPU due to memory pressure
  • I/O Impact: 53% I/O wait causing system unresponsiveness

System State During Issue: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1207 37.5 90.3 5043280 3628752 ? Dl 08:14 34:32 warp-terminal

Memory Before Issue Resolution: total used free shared buff/cache available Mem: 3.8Gi 3.8Gi 105Mi 13Mi 44Mi 4.7Mi

System Impact

  • Performance: System became nearly unresponsive
  • Load Average: Increased from normal ~0.5 to 2.30
  • I/O Wait: 53.1% (normally <5%)
  • Memory Swapping: Active (kswapd0 consuming 19% CPU)
  • Risk: System was close to complete freeze

Resolution

  • Restarting Warp Terminal immediately resolved the issue
  • New Warp process uses normal 381MB RAM (down from 3.6GB)
  • System performance returned to normal instantly

Memory After Restart: total used free shared buff/cache available Mem: 3.8Gi 661Mi 3.0Gi 6.6Mi 381Mi 3.2Gi

Actual Behavior

  • Memory usage grew to 3.6GB (18x expected usage)
  • Caused system-wide performance degradation
  • Required process restart to resolve

Technical Analysis

This appears to be a classic memory leak pattern:

  • Unbounded memory growth over time
  • No automatic garbage collection or memory limits
  • Likely related to terminal buffer/history management
  • Memory not released until process termination

Suggested Fixes

  1. Implement memory usage monitoring and limits
  2. Add automatic garbage collection for terminal buffers
  3. Periodic cleanup of cached terminal history
  4. Memory profiling to identify specific leak sources
  5. Graceful memory management when approaching system limits

System Information

  • Architecture: x86_64
  • Available Memory: 3.9GB
  • Swap: None configured
  • Session Duration: ~1.5 hours when issue occurred
  • Terminal Usage: Standard command-line operations

Priority

CRITICAL - This issue can render systems unusable, especially on lower-memory machines. Users may lose work or experience system crashes.

Additional Notes

  • Issue was discovered through AI Assistant analysis of system performance
  • Complete system diagnosis was required to identify root cause
  • Restart resolved issue immediately, confirming memory leak diagnosis
  • This affects user productivity and system stability significantly

To reproduce

Reproduction Steps

  1. Start Warp Terminal normally
  2. Use terminal for extended period (session ran for ~1.5 hours)
  3. Memory usage gradually increases over time
  4. Eventually consumes majority of system RAM
  5. System becomes unresponsive due to memory pressure

Expected behavior

Expected Behavior

  • Terminal application should use 50-200MB maximum
  • Memory usage should remain stable over time
  • Should not consume >90% of system memory

Screenshots, videos, and logs

No response

Operating system (OS)

Linux

Operating system and version

Debian 13.1 (trixie)

Shell Version

bash 5.2.37

Current Warp version

v0.2025.09.17.08.11.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

Additional Context

Display Server: X11 (not Wayland)

Hardware Information:

  • CPU: AMD Athlon Neo X2 Dual Core Processor 6850e
  • GPU: AMD/ATI RV710/M92 [Mobility Radeon HD 4330/4350/4550]
  • System: DietPi (lightweight Debian-based distribution)

Graphics Tools Status:

  • eglinfo: Not installed/available
  • glxinfo: Not installed/available
  • Note: This is a minimal DietPi installation focused on efficiency

Memory Leak Context:

  • Issue is NOT graphical - it's a memory management problem
  • Memory consumption grew from normal (~100-200MB) to 3.6GB over ~1.5 hours
  • Issue occurred during normal terminal usage (no graphics-intensive operations)
  • System has limited RAM (3.9GB total), making this leak particularly impactful
  • No swap space configured, amplifying memory pressure effects

System Design Context:

  • DietPi is designed for resource-constrained environments
  • This memory leak is especially problematic on lightweight/embedded systems
  • The leak consumed 92% of available system memory
  • Caused system-wide performance degradation and near-freeze

Reproduction Environment:

  • Clean DietPi installation
  • Standard LXDE desktop environment
  • X11 display server
  • No custom graphics configurations
  • Warp Terminal installed via standard method

The memory leak appears unrelated to graphics rendering and more likely related to terminal buffer/history management or session data accumulation.

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

Oskar-Andersson avatar Sep 22 '25 08:09 Oskar-Andersson

@Oskar-Andersson if you don't use Warp (i.e.: launch it and let it sit idle in the background), does memory usage increase over time? Or does it only increase with active usage?

vorporeal avatar Sep 22 '25 17:09 vorporeal

@Oskar-Andersson if you don't use Warp (i.e.: launch it and let it sit idle in the background), does memory usage increase over time? Or does it only increase with active usage?

It is only when in active use. So it would seem to indicate the buffers growing and never being garbage collected - perhaps the AI agent / tools own internal buffers as well (when it checks logs or runs commands etc)

Oskar-Andersson avatar Sep 23 '25 08:09 Oskar-Andersson

The ram usage is unacceptable lately - I cannot have my terminal open, running simple commands like docker logs my-container --tail 100 --follow for more than 4 or 5 hours without memory usage exceeding 15gb.

What's going on, is there anything I can disable or tweak in the settings?

jwerardi avatar Sep 26 '25 14:09 jwerardi

got memory leak on windows Image

hang333 avatar Oct 07 '25 00:10 hang333

I am having the same issue where it uses 44 gb I found taht it only starts to do that if it open ytthe code review window because for some reason it is loading all code reviews across all agents and sessiosn even closed ones. can we please have a way to just teh history of that window ?

rodrigo467 avatar Jan 12 '26 12:01 rodrigo467

The same thing happened to me but on MacOS. This issue makes Warp unusable, I have been forced to switch terminals.

Divide-By-0 avatar Feb 05 '26 00:02 Divide-By-0

Image

16G ram, what's happening, I am only use one claude code terminal...

joyshan1986 avatar Apr 11 '26 17:04 joyshan1986

@joyshan1986 Are you on the newest version? We have been releasing a few memory performance improvements the last couple of weeks.

kevinchevalier avatar Apr 13 '26 15:04 kevinchevalier

@joyshan1986 Are you on the newest version? We have been releasing a few memory performance improvements the last couple of weeks.

Hi @kevinchevalier

yes I am on the newest version v0.2026.04.08.08.36.stable_05

My AI function of Warp was suspended when I first registered warp, but it doesn't matter because I use warp as ternimal together with claude code and codex.

I observed the situation when the ram usage spiked: when I launched Claude Code in warp, then use /resume to load a session, the memory spikes even the context windows only has 11% with 1M contex.

this is the main issue for me. check below

Image Image

when I launch warp freshly wiht notiong, the memory is about 200-300 mb

Image Image

I guess the issue is realted with Claude Code /resume command.

please investigate and fix this issue.

Thanks

joyshan1986 avatar Apr 14 '26 07:04 joyshan1986

Hi @kevinchevalier

also when I use claude code with Warp, the ram eats more and more when the contexts increased

Image Image

joyshan1986 avatar Apr 14 '26 08:04 joyshan1986

Thanks for that info, I will take a look.

kevinchevalier avatar Apr 14 '26 13:04 kevinchevalier

@joyshan1986 Can you try a different font, as referenced in this issue #8569. Make sure to restart Warp. Then let me know if you still experience this issue.

This might be related to fallback fonts on Windows.

kevinchevalier avatar Apr 14 '26 14:04 kevinchevalier

Unusable with this sort of memory leak. I quit the app and went back to my previous terminal.

natekettles avatar Apr 15 '26 08:04 natekettles

@joyshan1986 Can you try a different font, as referenced in this issue #8569. Make sure to restart Warp. Then let me know if you still experience this issue.

This might be related to fallback fonts on Windows.

@kevinchevalier Thank you!

Once I changed the font to 仿宋 or 黑体, the memory is about 300mb+

I think this solve the issue.

joyshan1986 avatar Apr 15 '26 09:04 joyshan1986

@joyshan1986 Good to hear that! We are working on a fix for this as well. We hope to get that out soon.

kevinchevalier avatar Apr 15 '26 13:04 kevinchevalier

@natekettles Sorry to hear that. Would you be willing to share more about any memory issues that you have encountered? What amount of memory usage did you see? What operating system? What were you doing in Warp?

kevinchevalier avatar Apr 15 '26 13:04 kevinchevalier

@kevinchevalier in case it's helpful, in my case, I'm running on Linux, using codex/claude and I'm seeing >100% CPU and ~22GB of memory.

hferreiro avatar Apr 16 '26 10:04 hferreiro

Hey @hferreiro sorry for the delay.

How are you viewing the memory statistics? Are you able to see if the memory is being used by Warp, or whether it is the Codex/Claude processes that have high consumption?

kevinchevalier avatar Apr 27 '26 20:04 kevinchevalier

I just looked at the memory column from top. That should only take into account the memory from warp, I think.

hferreiro avatar Apr 28 '26 10:04 hferreiro

Version v0.2026.04.29.08.57.stable_01

Environment Operating System: Fedora Linux 43 KDE Plasma Version: 6.6.4 KDE Frameworks Version: 6.25.0 Qt Version: 6.10.3 Kernel Version: 6.19.14-200.fc43.x86_64 (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 9950X 16-Core Processor Memory: 64 GiB of RAM (60.4 GiB usable) Graphics Processor: AMD Ryzen 9 9950X 16-Core Processor Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7E49 System Version: 1.0

Memory Usage (Critical): Memory consumption increases even iddle, just by being open, at about 20Mb/s rate. It has reached up to 40GB, freezes the whole system

adabreug94 avatar May 08 '26 06:05 adabreug94