Renderer OOM crash: OTEL exporter leaks memory when trace spans rejected (400)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Platform: macOS 15 (Apple Silicon), Cursor latest
Heap: --max-old-space-size=8192 set

Every ~7-10 minutes, renderer crashes with:
CodeWindow: renderer process gone (reason: crashed, code: 5)

Root cause visible in renderer.log — OTEL exporter fires every 7-15 seconds,
server returns 400 “Trace spans collection is not enabled for this user”,
but spans are never dropped — they accumulate until renderer OOMs:

OTLPExporterError: Bad Request
{“error”:“Trace spans collection is not enabled for this user”}

Fix needed: drop/reset span queue on repeated 400 responses instead of retrying.
This affects any account where trace span collection is disabled.

Steps to Reproduce

Cursor crashes every 7-9 minutes for the last three weeks. Literally an unused agent window, no typing, crashes. No steps required.

Expected Behavior

Cursor itself analyzed the logs and suggested I post this bug

Operating System

MacOS

Version Information

Version: 2.5.26
VSCode Version: 1.105.1
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0
Date: 2026-02-26T04:57:56.825Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report.

This is a known issue. The OTEL exporter doesn’t drop spans when the server rejects them with a 400 status code, so they keep piling up until the renderer runs out of memory.

As a workaround, try turning off Privacy Mode in Cursor: Settings > General > Privacy Mode. The “Trace spans collection is not enabled for this user” error likely means the server is rejecting spans because Privacy Mode blocks telemetry collection. Disabling it should let the server accept the spans instead of them building up in memory.

The team is aware of the problem. There’s no timeline for a full fix yet, but your report helps with prioritization. Let me know if turning off Privacy Mode helps.

Cursor suggested: Our fix: Patch OTEL transport → treat 400 as success → spans dropped locally

Thanks for the quick response and the context. Our diagnosis matches. We patched the OTEL transport locally to treat 400 as success (drop spans immediately), which stops the accumulation without turning off Privacy Mode. That’s working. We’d prefer to keep Privacy Mode on since the workspace contains proprietary code. The patch will need to be re-applied after each Cursor update — a proper fix on your end (drop spans on persistent 400s regardless of Privacy Mode) would be the right long-term solution.