Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Subject: Renderer crashes (“clean-exit”) caused by unbounded growth of state.vscdb — 97% of agentKv blobs are unreachable garbage
Environment
- Cursor 3.19.7-1788393004 (.deb), installed 2026-09-04
- Ubuntu 26.04.1 LTS, kernel 7.0.0-31-generic
- GNOME on Wayland, 30 GB RAM, 79 GB free disk
Symptom
Windows die repeatedly with the dialog:
The window terminated unexpectedly (reason: 'clean-exit', code: '0')
On 2026-09-10 this happened 8 times between 09:58 and 10:09, versus roughly
once a day in the preceding days. Reopening the window works, then it dies again.
From main.log, the pattern before each death is always the same:
[warning] [RendererPing] window 2 (pid 0) blocked for ~17614ms
[error] CodeWindow: renderer process gone (reason: clean-exit, code: <unknown>)
and once, a genuine crash rather than a clean exit:
[error] CodeWindow: renderer process gone (reason: crashed, code: 7)
At the time of the crashes a single renderer process was resident at 1.1 GB.
There was no system memory pressure: 15 GB were available and the kernel OOM
killer never fired. This is the renderer’s own heap, not the machine.
Root cause I was able to identify
~/.config/Cursor/User/globalStorage/state.vscdb has grown to 1.1 GB.
It was 220 MB on 2026-08-27, so it roughly quintupled in two weeks.
Breakdown of the cursorDiskKV table (112,850 rows, 992 MB):
| Key prefix | Rows | Size |
|---|---|---|
| agentKv:blob | 46,389 | 472 MB |
| bubbleId | 62,921 | 433 MB |
| checkpointId | 446 | 37 MB |
| composer | 1,901 | 29 MB |
| composerData | 84 | 12 MB |
The important finding is in agentKv:blob:<sha256>. I walked the reference
graph: I collected every 64-hex string appearing in all other rows
(bubbleId, composerData, checkpointId, composer, ItemTable,
composerHeaders), then followed blob-to-blob references transitively.
Result, with all conversations retained and nothing deleted:
- 1,398 blobs reachable (19 MB)
- 44,991 blobs unreachable (453 MB)
So 97% of the agent blob store is garbage that nothing references any more.
There appears to be no garbage collection for this content-addressed store:
blobs are written and never reclaimed, even when the conversation that
produced them is gone. This is what is driving the database growth, and the
database size is in turn what stalls the renderer for 15 to 17 seconds and
eventually kills it.
For reference, only 84 conversations exist in total, of which 24 are older
than 30 days. Deleting those 24 old conversations reclaims just 48 MB.
Reclaiming the orphaned blobs reclaims 453 MB. The problem is the blob leak,
not the chat volume.
After removing the orphaned blobs and running VACUUM on a copy, the database
went from 1,109 MB to 565 MB and PRAGMA integrity_check returned ok.
Second, unrelated bug: agent sandbox never starts on Ubuntu
Every extension host start logs this:
ERROR [sandboxPreflight] Preflight failed: Command failed:
/usr/share/cursor/resources/app/resources/helpers/cursorsandbox
--policy ... --preflight-only -- /bin/true
Error: Failed to resolve Linux sandbox backend: Landlock error: Step 1-2/7
(user namespace) failed: Failed to unshare namespaces: EPERM.
Bubblewrap error: Bubblewrap namespace setup failed:
Failed to unshare namespaces: EPERM: Operation not permitted
The cause is Ubuntu’s AppArmor restriction on unprivileged user namespaces,
which is on by default since 24.04:
kernel.apparmor_restrict_unprivileged_userns = 1
Both sandbox backends need unshare() and both are therefore blocked out of
the box on a stock Ubuntu install. Cursor ships no AppArmor profile to allow
this, so the sandbox is permanently unavailable. Either shipping a profile
with the .deb, or detecting this condition and surfacing a clear message
instead of a stack trace, would help.
Third, minor: agent CLI versions are never pruned
globalStorage/anysphere.cursor-agent-worker/agent-cli/.local/share/cursor-agent/versions/
held 11 downloaded versions going back to 2026-07-09, totalling 3.1 GB. Only
the newest is symlinked from bin/cursor-agent. Old versions are never
removed. I deleted nine of them by hand and recovered 2 GB.
What I would ask for
- Garbage collection for
agentKv:blob, or at least a maintenance command
that reclaims unreferenced blobs. - Retention or size limits on
cursorDiskKV, so the database cannot silently
reach a gigabyte. - Pruning of old
cursor-agentversions after an update. - An AppArmor profile for the sandbox helper on Ubuntu, or a clear diagnostic.
I still have the untouched 1.1 GB database and the full logs, and I am happy
to send them or run any query you need against them.
Steps to Reproduce
detailed in the bug description
Expected Behavior
cursor renderer not crashing would be very nice
Operating System
Linux
Version Information
detailed in the bug description
Does this stop you from using Cursor
Yes - Cursor is unusable