How to delete Kiro session history, and what you lose

the CLI and the IDE write different trees, so check which one a session came from

Kiro ships a CLI and an IDE, and they do not write the same files. Both keep their sessions under ~/.kiro/sessions, but the CLI writes a pair of files per session and the IDE writes a directory per session. Deleting one conversation is easy once you know which tree it is in.

Where the sessions are

The CLI writes two files per session, side by side:

~/.kiro/sessions/cli/<sessionId>.jsonl   the transcript
~/.kiro/sessions/cli/<sessionId>.json    the header: session id and the directory it ran in

The IDE writes one directory per session, grouped by workspace:

~/.kiro/sessions/<workspace>/sess_<uuid>/messages.jsonl
~/.kiro/sessions/<workspace>/sess_<uuid>/session.json

session.json holds the id, the model, the workspace paths and the timestamps. messages.jsonl holds the conversation, along with the agent's own bookkeeping records.

How to delete it

Close Kiro first, so a running session cannot write its files back. Then, for one CLI session, remove both files named after its id:

rm ~/.kiro/sessions/cli/<sessionId>.jsonl ~/.kiro/sessions/cli/<sessionId>.json

For one IDE session, remove its directory:

rm -r ~/.kiro/sessions/<workspace>/sess_<uuid>

Every session is its own file or directory, so removing one leaves the rest alone. To clear a whole tree, remove ~/.kiro/sessions/cli for the CLI, or the workspace directories beside it for the IDE. The two trees are independent: clearing one does not clear the other.

What ~/.kiro/sessions does not cover: the IDE also mirrors its chats into its globalStorage (kiro.kiroagent/<workspace>/*.chat), and kiro-cli chat --no-interactive keeps its conversations in a kiro-cli/data.sqlite3 database, one row each in the conversations_v2 table. If the goal is that nothing is left, check those too. deja reads the database but not the globalStorage mirror, which no sample was available to verify against, so this page does not describe its contents.

What you lose

The sessions are the record of what was tried and what worked. A CLI session you remove can no longer be reopened with kiro-cli chat --resume-id. There is no archive: a removed session is gone, not moved.

Keeping it searchable instead

deja reads both Kiro trees, along with the other forty agents' histories on the machine, into one local index. It is searchable from the shell and readable by the agents themselves over MCP:

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

Nothing to switch on first: the sessions are already on disk, including the months before deja was installed. Indexing and search stay local, credentials are stripped as the index is built, and deja forget drops a session from the index for good. A CLI session you deleted stays under the Deleted tab of the screen bare deja opens, and R writes its conversation back so kiro-cli can resume it; IDE sessions are not written back.

Where every agent keeps its history · Memory for Kiro · The Kiro format

Found this useful? Star deja-vu on GitHub.