How to delete Kilo Code task history, and what the other half keeps

two stores that do not know about each other: the extension's task directories and the CLI's database

Kilo Code records a task twice over, in two stores that know nothing about each other: the VS Code extension writes a directory per task, and the command-line version keeps a SQLite database. Deleting in one leaves the other untouched, which is the part that surprises people.

Where the tasks are

<globalStorage>/kilocode.kilo-code/tasks/<id>/api_conversation_history.json
~/.local/share/kilo/kilo.db

The extension's globalStorage is ~/Library/Application Support/Code/User/globalStorage on macOS and ~/.config/Code/User/globalStorage on Linux, with Code - Insiders, VSCodium, Cursor or Windsurf in place of Code for those hosts. The CLI store follows XDG_DATA_HOME when it is set.

How to delete it

In the extension, delete the task from Kilo's own history view. On disk a task is one directory, so with VS Code closed:

rm -rf <globalStorage>/kilocode.kilo-code/tasks/<id>
rm -rf <globalStorage>/kilocode.kilo-code/tasks

The CLI is the half people forget. Its history is rows in a database, so removing the file is the whole operation, and deleting rows will not shrink it:

rm ~/.local/share/kilo/kilo.db

Both halves, then — clearing one and calling it done is how a conversation you meant to remove stays on the machine.

What you lose

A task directory is the record of what the agent read, changed and ran, and Kilo has no search across tasks: the list is the only way in. Once the directory is gone, the reasoning behind every file that task touched is gone with it.

Keeping it searchable instead

deja reads both Kilo stores — the extension's task JSON and the CLI database — and the other thirty-three agents on the machine, into one local index:

curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh
deja "kilo task about the migration"

Indexing and search stay local, credentials are stripped as the index is built, and deja forget drops a session for good when you do want it gone.

Where every agent keeps its history · Memory for Kilo Code · The Kilo Code format

Found this useful? Star deja-vu on GitHub.