How to delete Zed agent thread history, and what you lose
Zed's built-in agent stores thread contents in one database, not one file per conversation
Use Zed's thread history to delete one conversation. Removing the database removes every built-in agent thread stored in it. External agents connected through ACP can keep their own session stores; clearing Zed's built-in database does not erase those.
Where the threads are
| Platform | Built-in agent database |
|---|---|
| macOS | ~/Library/Application Support/Zed/threads/threads.db |
| Linux and FreeBSD | ${XDG_DATA_HOME:-~/.local/share}/zed/threads/threads.db |
| Windows | %LOCALAPPDATA%\Zed\threads\threads.db |
A Flatpak install uses FLATPAK_XDG_DATA_HOME for its data root. A custom Zed data directory also changes this location. Check the data directory used by the instance whose history you want to remove.
~/.config/zed is a configuration directory, not the thread store. It contains settings and keymaps; deleting it will not clear the built-in agent's conversations.
Deleting one thread
Open Thread History in the threads sidebar and find the thread. If it is not archived, use Archive Thread first. The trash control, Delete Thread, appears on archived threads; use it to delete the archived thread. Zed updates its history metadata and asks the owning agent to delete the session when that agent supports deletion. For the built-in agent, deletion also removes the thread's subagent descendants.
Keep any work you need before deleting a thread. Deleting conversation history is not an undo operation for edits in your working project. External agents may handle deletion differently; use their own history tools when needed.
Deleting all built-in agent thread contents
- Close every Zed window and stop any remaining Zed process using that data directory.
- Copy the entire
threads/directory to a separate backup if you may need the conversations again. - Remove
threads.dbfrom the original directory. Remove itsthreads.db-walandthreads.db-shmcompanion files too if they remain after Zed has closed. - Reopen Zed. The built-in agent starts with a new database.
Do not remove individual SQLite files while Zed is running. The history UI also has separate thread metadata, so clearing the content database is not a promise that every history-list entry disappears. Use the history UI for individual entries. Do not delete Zed's unrelated workspace databases to hide a stale entry.
What you lose
The database holds the built-in agent's saved conversation contents, including tool results and child threads. Without it or a backup, those conversations cannot be resumed from their original contents. Settings live elsewhere. Files the agent edited, exported transcripts, external-agent stores and provider-side records are separate from this database.
Deleting a thread through the UI removes rows but does not necessarily shrink the SQLite file immediately. Removing the whole database is a history reset, not a way to prune a single large conversation.
Keeping it searchable instead
Install deja to search Zed's saved conversations without clearing them:
deja index deja "Zed thread about the parser"
The Zed reader needs both sqlite3 and zstd, because current thread bodies are compressed. deja doctor reports missing tools. Indexing and search stay local; deja forget removes a session from the index. Threads deja indexed stay searchable after the database goes, but deja cannot write them back into Zed. Keep a database backup if you need to restore native Zed history.
Sources
Checked against Zed's data-directory resolution, thread database and thread deletion UI. See the Zed format registry for deja's reader details.
Where history lives | Memory for Zed
Found this useful? Star deja-vu on GitHub.