warp icon indicating copy to clipboard operation
warp copied to clipboard

Memory Leak in Warp Terminal When Running Claude Code and Codex

Open nanoTiO2 opened this issue 9 months ago • 17 comments

Pre-submit Checks

Describe the bug

ImageAfter running Claude Code, Codex, and other terminals in Warp for a period of time, I encountered a memory leak. The memory usage keeps increasing, and now it has successfully occupied 16 GiB, and can even reach up to 30 GiB. Why does this happen?

To reproduce

  1. open one fold
  2. "right click" open warp in new tab
  3. tap"codex"
  4. wait 5..open the other fold
  5. "right click" open warp in new tab
  6. tap"claude"
  7. wait
  8. hours later
  9. Memory Leak

Expected behavior

No response

Screenshots, videos, and logs

Image

Operating system (OS)

Windows

Operating system and version

10.0.26100

Shell Version

No response

Current Warp version

v0.2026.01.28.08.14.stable_04

Regression

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

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

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

nanoTiO2 avatar Feb 04 '26 07:02 nanoTiO2

@nanoTiO2 do you need to have anything run within codex or claude? or just have them sit open, unused, for a long period of time?

vorporeal avatar Feb 04 '26 20:02 vorporeal

I have been using claude code a lot lately and have had 3 crashes - I have a mac m4Max. I read in a thread that Ghostly also had a memory leak problem. So this might be the reason!

adiberk avatar Feb 13 '26 06:02 adiberk

It happens on mac too.

Image

JonL1 avatar Feb 24 '26 18:02 JonL1

For folks on macOS - here's a special version of the current stable build that includes additional logic to track memory usage and will report statistics to us when memory usage exceeds 15GB.

Would love for you to install and use this so we can get some better insight into what's going on.

https://drive.google.com/file/d/1ePsaG1DqfhbTDNkUh65bCh0_ncYno08b/view?usp=sharing

vorporeal avatar Feb 24 '26 22:02 vorporeal

Here’s a clue: my native language is Chinese. When I use Warp’s default font while using Claude Code, this issue always occurs. But when I change the font to FangSong, which supports Chinese, the memory leak does not occur.

Runarry avatar Feb 25 '26 11:02 Runarry

@Runarry what platform are you using?

vorporeal avatar Feb 26 '26 21:02 vorporeal

@Runarry what platform are you using?

Windows 11

Runarry avatar Feb 26 '26 22:02 Runarry

@Runarry Terminal font, I use HeiTi, still memory leak

wosuxiongmao avatar Mar 05 '26 16:03 wosuxiongmao

@wosuxiongmao After setting up the font, restart Warp and try again. You can try switching to a few different fonts; if a font doesn’t include all the characters, this problem can still occur. I’m currently using the MapleMono NF CN font, and the memory leak issue hasn’t occurred again.

Runarry avatar Mar 06 '26 06:03 Runarry

MapleMono NF CN

what is MapleMono NF CN ?

wosuxiongmao avatar Mar 14 '26 10:03 wosuxiongmao

Here’s a clue: my native language is Chinese. When I use Warp’s default font while using Claude Code, this issue always occurs. But when I change the font to FangSong, which supports Chinese, the memory leak does not occur.

i try FangSong ,not work

wosuxiongmao avatar Mar 17 '26 14:03 wosuxiongmao

Here’s a clue: my native language is Chinese. When I use Warp’s default font while using Claude Code, this issue always occurs. But when I change the font to FangSong, which supports Chinese, the memory leak does not occur.

i try FangSong ,not work

After changing the Terminal font, you need to restart Warp.

Runarry avatar Mar 17 '26 14:03 Runarry

Here’s a clue: my native language is Chinese. When I use Warp’s default font while using Claude Code, this issue always occurs. But when I change the font to FangSong, which supports Chinese, the memory leak does not occur.

i try FangSong ,not work

After changing the Terminal font, you need to restart Warp.

Image Previously, it seemed that I didn't click "view all available system font" , i often restart warp and windows

wosuxiongmao avatar Mar 17 '26 14:03 wosuxiongmao

Image

Just got this while Claude Code was refactoring the code in Warp

ssrskvirsky avatar Apr 11 '26 18:04 ssrskvirsky

Here’s a clue: my native language is Chinese. When I use Warp’s default font while using Claude Code, this issue always occurs. But when I change the font to FangSong, which supports Chinese, the memory leak does not occur.

@Runarry This comment helped us track down this issue and fix it. I wanted to say thank you so much for your help.

The fix will be in tonight's Preview release, and soon on Stable. We are not sure if it will go out in a hotfix release or in next week's regular release.

kevinchevalier avatar Apr 16 '26 22:04 kevinchevalier

We just released v0.2026.04.15.08.45.stable_03 for Windows as a hotfix. Please try it out and let me know if this seems to fix the issue.

kevinchevalier avatar Apr 20 '26 22:04 kevinchevalier

I'm going to mark this as fixed. Let me know if you notice it again.

kevinchevalier avatar Apr 27 '26 21:04 kevinchevalier