Cursor's Archive button hides chats. The rows stay in state.vscdb, and Cursor Helper (Renderer) keeps paying for them.
This is a Cursor plugin (not a standalone MCP dump): rules, skills, commands, logo, and an MCP server that searches a local SQLite vault. You ask “when did we talk about the memory leak?”; the agent pulls snippets. Ask for the whole transcript and it reads that chat into this conversation — not back into the renderer.
Measured on one Mac, 28 Aug 2026, after export, before prune: renderer 1.97 GB RSS, state.vscdb 3.68 GB (233 archived + 79 active), vault 2.68 GB (232 chats, 13,577 searchable messages). Search is 1-10 ms. Your numbers will differ.
| You want | Plugin surface | What RAM it uses |
|---|---|---|
| Find the chats | MCP search_archive, /search-archive |
Vault SQLite. Renderer unchanged. |
| Read one chat | MCP read_composer |
Agent context in this thread. Still not the renderer. |
| Shrink Cursor | /export-archived, Quit (Cmd+Q), /prune-from-cursor |
Deletes vaulted archived rows from state.vscdb. |
Nothing is copied back into Cursor's live DB. Sidebar Archive is not this.
This is not a second Portable LLM Wiki. The wiki is markdown pages, [[wikilinks]], and Karpathy ingest. Buddy is a dump-and-query archive of Cursor composers. It steals the wiki's retrieval habits (composer as page, skip hub chats, empty index stays empty), not the wiki product.
Requires Python 3 on PATH (the MCP server is stdio Python shipped inside the plugin).
Cursor discovers Cursor Plugins from ~/.cursor/plugins/local when local plugin imports are allowed (docs).
git clone https://github.com/professorpalmer/cursor-buddy.git
mkdir -p ~/.cursor/plugins/local
rsync -a --delete --exclude .git cursor-buddy/ ~/.cursor/plugins/local/cursor-buddy/Then Developer: Reload Window. Open Customize and confirm:
- Plugin: Cursor Buddy
- Rule: vault-not-live-db
- Skill: archived-chats
- Commands:
/export-archived,/prune-from-cursor,/search-archive - MCP:
cursor-buddywithlist_composers,search_archive,read_composer
The bundled mcp.json uses python3 plus ${PLUGIN_ROOT}/bin/cursor-buddy (Agent Plugins spawn shape: interpolate PLUGIN_ROOT in args/cwd, never in command). If MCP connects with 0 tools, Cursor is still starting the server with cwd = home and not expanding ${PLUGIN_ROOT}. Set args[0] in ~/.cursor/plugins/local/cursor-buddy/mcp.json to that copy's absolute bin/cursor-buddy path and reload.
# Safe while Cursor is open
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy export
# Requires Cmd+Q first
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy prune # dry-run
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy prune --applyVault path: ~/Library/Application Support/cursor-buddy/vault.sqlite. Active (unarchived) chats are never exported or pruned.
Marketplace listing (after review): cursor.com/marketplace/publish.
| Kind | Path |
|---|---|
| Manifest | .cursor-plugin/plugin.json |
| MCP | mcp.json → bin/cursor-buddy mcp |
| Skill | skills/archived-chats/ |
| Rule | rules/vault-not-live-db.mdc |
| Commands | commands/*.md |
| Hooks | hooks/hooks.json (export on workspace/session) |
| Logo | assets/logo.svg |
Archive in the sidebar still does not copy or delete anything. Buddy splits the job:
- Ingest (safe while Cursor is open).
exportcopies newly archived chats into the vault. Plugin hooks run that onworkspaceOpen,sessionStart, andsessionEnd. Unchanged chats are skipped. - Prune (only after Cursor releases
state.vscdb). Never from a hook that runs while the app is open. Install a LaunchAgent that prunes once the DB is idle:
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy install-automationIf you archive a chat tonight, the next workspace open or agent session copies it. After you Quit (Cmd+Q), leave Cursor closed for a minute so prune-if-idle can delete those rows (VACUUM can take a bit on a large state.vscdb). Active chats are never touched.
Manual export/prune still works.
search_archive keeps distinctive tokens (length >= 3, stop list), requires every token to appear in the same composer (title or messages, not necessarily one bubble), and caps hits per composer so a 50k-bubble chat cannot fill the result. Stop-only queries return nothing. Tool bubbles with empty text are not indexed; composerData / plan blobs are not dumped into FTS.
MIT