Skip to main content
← All posts
A 30s Black woman software engineer in a rust colored wool cardigan at a dark walnut desk at dusk, inspecting Kilo Code task JSON files on a 16 inch matte black laptop, screen split between a VS Code sidebar showing the tasks folder tree and a text editor with syntax highlighted JSON in warm coral accents on near black background, single warm brass desk lamp casting low key rim light, shallow depth of field, Monocle magazine editorial composition.
·6 min read

How to Read Kilo Code Chat History (2026 Guide)

Where Kilo Code stores every VS Code task on disk, what the four JSON files contain, and how to export or grep across every session in under a second.

Kilo Code is a VS Code extension in the Cline and Roo Code family. It runs coding tasks against your own API keys, keeps a verbose transcript of every tool call, and racks up long sessions fast. A single refactor across a monorepo can produce a task file with hundreds of tool invocations and ten thousand words of reasoning. The problem starts when you want to read one of those sessions a week later, or grep across all of them to find the time you solved a tricky Prisma migration.

The VS Code side panel is not built for that. It is built for live chat, one message at a time, with no search across sessions and no way to export a clean document. That gap is why most Kilo Code users end up screenshotting or copy pasting fragments of transcripts into Notion. This guide shows where Kilo Code stores its chat history on disk, what each file contains, how to export a session into clean markdown, and how to search across every task you have ever run in under a second.

Where Kilo Code Stores Chat History

Kilo Code writes every task to the VS Code global storage directory under its own extension folder. The exact path depends on your operating system. On macOS the folder is ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/tasks/. On Linux it sits at ~/.config/Code/User/globalStorage/kilocode.kilo-code/tasks/. On Windows you will find it at %APPDATA%\Code\User\globalStorage\kilocode.kilo-code\tasks\.

Inside that folder, each task is its own subdirectory named with a long numeric timestamp. The subdirectory is the entire session. If you rename it, Kilo Code loses the reference in its sidebar but the data stays intact. If you zip the folder and move it to another machine, you can drop it back and restore the full history. This is the same pattern Cline uses, and if you have read our Cline chat history guide the layout will look familiar.

What Is Inside A Task Folder

A single Kilo Code task directory contains four files that together describe the entire run. Knowing what each one holds is the difference between a messy export and a readable transcript. The files are small on short tasks and can balloon into hundreds of megabytes on long agentic runs. Worth knowing before you try to open one in a basic text editor.

  • api_conversation_history.json is the raw request and response payload sent to your model provider. This is the source of truth for every token that went over the wire, including system prompts and tool schemas.
  • ui_messages.json is the sanitized version the sidebar renders. It strips tool schemas, collapses long tool outputs, and tags each message with a role and a timestamp.
  • task_metadata.json holds the task title, the model used, cost totals, and token counts. This is what you want if you are building a dashboard over your own usage.
  • .gitignore and small image attachments may also appear, depending on the tools Kilo Code called during the task.

For human reading, ui_messages.json is the better starting point. It is smaller, already grouped by turn, and renders cleanly in any markdown reader. For auditing exactly what the model saw, open api_conversation_history.json instead. If you are comparing Kilo Code to other agents in the same family, the storage split is nearly identical in Roo Code and is covered in our Roo Code history guide.

How To Export A Kilo Code Session As Markdown

The native extension has no export button yet. The fastest manual path is to open the task folder in Finder or your file manager, drop ui_messages.json into a markdown reader, and let the reader group turns and render code blocks. Prism MD does this natively. Drop the JSON file into the import tray and it produces a document with roles, timestamps, syntax highlighted code, and rendered Mermaid or KaTeX if the model produced any.

If you want a scripted export, a six line Python loop over the messages array is enough. Read the JSON, walk each entry, emit a ## User or ## Assistant heading, and write the content block as fenced markdown. The one gotcha is that tool call results are often serialized as JSON strings inside a text field, so you want to detect and pretty print them before writing. Once you have markdown, every other workflow opens up. You can commit the file to a notes repo, feed it into a search index, or archive it for later reference. For long term storage strategy, our guide on archiving AI conversations walks through what survives across model and tool migrations.

Searching Across Every Kilo Task

Once you know the storage path, ripgrep solves the search problem in one line. Point it at the tasks directory with a JSON filter and a case insensitive match. A query like rg -i "prisma migration" ~/Library/Application\ Support/Code/User/globalStorage/kilocode.kilo-code/tasks/ returns every task where that phrase shows up, with a path you can open directly. On a six month old tasks directory with a few hundred sessions, the search finishes in well under a second. This is the single biggest workflow improvement on this extension family.

The trick is remembering the search terms. Kilo task titles are auto generated from the first user prompt, which means they look useful in the sidebar for a day and then become indistinguishable from each other. If you plan to keep history around, rename the subdirectory after a task completes to something that will still make sense in three months. A convention like 20261103-prisma-refactor-user-table works well because ripgrep can filter by filename pattern too. For a broader pattern that applies to every agentic CLI and extension, see our guide on reading AI coding agent transcripts.

FAQ

Does deleting a task from the Kilo Code sidebar wipe the files on disk? It removes the entry from the sidebar index but older versions of the extension have been known to leave orphan folders behind. Check the tasks directory directly before assuming a task is gone for good. The safest path is to delete the subdirectory by hand if you want the data removed. Doing it in Finder or your file manager also lets you move a task to an archive folder instead of destroying it, which is often the outcome you wanted anyway.

Can I share a Kilo Code session with a teammate? Yes, and it is easier than you might think. Zip the single task subdirectory and send it over the same way you would any other project folder. If the teammate wants the session to appear in their own Kilo Code sidebar, drop the folder into their equivalent tasks directory and restart VS Code. If they only want to read it, a markdown export is cleaner and avoids forcing them to install the extension at all.

Why are my api_conversation_history.json files so much larger than ui_messages.json? The API file includes full tool schemas and raw tool outputs on every turn. The UI file collapses repeated schema definitions and truncates long outputs for display in the panel. A ten to one size ratio between the two files is normal on long agentic sessions. If a specific task seems suspicious in size, open the API file and search for any tool that returned a large payload, since one oversized file read or web fetch can double the token count on its own.

Do Kilo Code tasks sync across machines? Not by default, and this surprises people. VS Code Settings Sync does not cover extension global storage, which is where these files live. If you want cross machine history, sync the tasks folder with your own tool such as rsync or Syncthing, or export to markdown and store that in a repo you already sync. The markdown route also gives you a permanent record that survives if you ever uninstall the extension.

Open every Kilo Code session as clean, searchable markdown.

Free to start — no credit card.

Try Prism MD free →

Related reading

Ready to read your own AI documents?

Open ChatGPT, Claude, Gemini, or any markdown file in the reader built for the way models write.

  • ✓Renders code, math & Mermaid out of the box
  • ✓Works offline once you've opened a doc
  • ✓Free forever for personal reading