OOM in cli (please reduce the title limit)

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

sent agent off to run some bazel comands in the background which produce a medium amount of logs

<--- Last few GCs --->

[1381308:0x32cdf000]   943841 ms: Mark-Compact 4093.8 (4129.0) -> 4090.9 (4129.0) MB, pooled: 0 MB, 27.38 / 0.00 ms  (average mu = 0.258, current mu = 0.150) allocation failure; scavenge might not succeed

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0xf41253 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/home/philkuz/.local/bin/agent]
 2: 0x1388b50 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/philkuz/.local/bin/agent]
 3: 0x1388c3f v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/philkuz/.local/bin/agent]
 4: 0x1621705  [/home/philkuz/.local/bin/agent]
 5: 0x1621732  [/home/philkuz/.local/bin/agent]
 6: 0x1621a2a v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector, v8::base::TimeTicks) [/home/philkuz/.local/bin/agent]
 7: 0x1631f4a  [/home/philkuz/.local/bin/agent]
 8: 0x16362f0  [/home/philkuz/.local/bin/agent]
 9: 0x20c8ff1  [/home/philkuz/.local/bin/agent]

Steps to Reproduce

turned agent on; after about 5 minutes it oomed

Operating System

Linux

Version Information

  ╭────────────────────────────────────────────────╮
  │                                                │
  │  About Cursor CLI                              │
  │                                                │
  │  CLI Version         2026.04.17-787b533        │
  │  Model               GPT-5.5 1M High           │
  │  OS                  linux (x64)               │
  │  Terminal            tmux                      │
  │  Shell               zsh                       │
  │  User Email          [email protected]     │
  │                                                │
  ╰────────────────────────────────────────────────╯

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hi @philkuz

Thanks for the detailed stack trace — this confirms the crash is a V8 heap exhaustion inside the CLI agent itself (separate from the systemd-oomd scenario we were looking at in your earlier thread).

This is a known issue that our CLI team is tracking.

As a workaround, you can increase the heap limit by launching the CLI with:

NODE_OPTIONS=--max-old-space-size=8192 cursor-agent

This won’t fix the underlying accumulation, but it should give you more headroom and reduce the frequency of crashes during heavy builds.

Let me know if that helps or if you hit it again even with the increased limit