Kimi Code Conversation History: Find, Name and Resume Sessions

Kimi Code keeps every session on your machine, and you can get back into one whenever you want. Resume the most recent session for the current project with kimi --continue, or open a specific one with kimi --session <id>. Sessions are stored per project as plain files under ~/.kimi-code/sessions/, so nothing is lost when you close the terminal. The native tooling is solid for the simple case: get back into your last conversation. It gets thin the moment you have real history. There is no full-text search across sessions, session ids are not something a human remembers, and the one tool you get for finding a session later is naming it yourself with /title while it is still open. This guide maps out exactly where Kimi Code history lives on disk (it is more inspectable than most agents), the resume flags and their gotchas, and how CodeAgentSwarm turns that same history into a searchable, cross-project, cross-agent memory you can reopen from any terminal.

The quick answer: resume with --continue or --session

Quick answer: Kimi Code saves sessions locally and per project. kimi --continue (short form -c) reopens the most recent session for the directory you are in. kimi --session <id> reopens a specific one. Name the session you are in with /title so you can find it again later.

Kimi Code conversation history is the record of everything a session contained: what you asked, what the agent did, and the context it built up along the way. Because context is the expensive part of working with a coding agent, being able to reopen a session instead of re-explaining a module from scratch is worth real time and real tokens.

If you are still setting the CLI up, start with the how to use Kimi Code guide. Everything below assumes you have sessions worth going back to.

Resuming: the flags and their gotchas

bash
# Reopen the most recent session for the current directory
kimi --continue    # short form: -c

# Reopen a specific session by id
kimi --session <session-id>

Two details matter here. First, --continue is scoped to the directory you run it from: it reopens the latest session for that project, not the latest session globally. Run it in the wrong repo and you get the wrong conversation. Second, -r and --resume exist as hidden aliases of --session, so habits from Claude Code mostly carry over, but the documented spelling is --session.

Mode flags override a resumed session. If you pass --yolo, --auto or --plan while resuming, the flag replaces the mode the session had saved. A careful session resumed with a leftover -y silently becomes a full-auto one. The Kimi Code YOLO mode guide covers this in depth.

Name sessions with /title while you still remember them

Inside a session, /title <text> gives it a name, and that name is persisted to disk with the session. This is the single most useful habit for Kimi Code history: a session called "auth migration to JWT" is findable in a week; an anonymous session id is not. Titling costs five seconds while the context is fresh and saves minutes every time you go looking later.

Where Kimi Code stores sessions on disk

Kimi Code is unusually transparent about its history: sessions are plain files, organized per project, with no database in the way. Everything lives under ~/.kimi-code/sessions/, with one directory per project and one subdirectory per session:

bash
~/.kimi-code/
  session_index.jsonl              # global index: session id -> directory + project
  sessions/
    <workDirKey>/                  # one bucket per project (derived from its path)
      <sessionId>/
        state.json                 # title, timestamps, session state
        agents/main/wire.jsonl     # the actual transcript, one event per line

The pieces fit together like this: the workDirKey is derived from a hash of the normalized project path, so each project gets its own bucket. Inside a session, state.json holds the title (including anything you set with /title) and timestamps, while agents/main/wire.jsonl is the transcript itself, a JSONL stream of everything that happened. The global session_index.jsonl at the top maps every session id to its directory and working dir, which is the cheapest way to enumerate all sessions across all projects.

Because it is all plain JSONL, you can inspect it with standard tools. A quick grep over wire.jsonl files answers "which session mentioned the payments webhook" without any special tooling, though at that point you are building your own search engine one command at a time.

Treat this layout as informative, not contractual. Kimi Code ships releases almost daily and is pre-1.0, so paths and file shapes can evolve. The resume flags and /title are the stable, documented surface.

Where native Kimi Code history starts to hurt

Native resume nails the common case: your last session in the current project, one flag away. The friction starts as soon as the session you want is not that one:

  • No full-text search. There is no built-in way to search across sessions for "that migration conversation from last week". Your options are remembering, titling diligently, or grepping raw JSONL.
  • Session ids are not memorable. Anything older than the latest session needs an id for --session, and you have to go find that id first.
  • History is per project. The per-project layout keeps things tidy, but it means finding work from another repo starts with cd-ing there first.
  • No view across agents. If you also run Claude Code, Codex or opencode, each keeps its own history in its own format in its own place. Four agents means four places to look.

Casual use never hits these walls. Daily use across several repositories hits all of them, usually in the same week.

Searchable Kimi Code history with CodeAgentSwarm

CodeAgentSwarm runs Kimi Code as a first-class agent and reads the session history it already stores locally. That history becomes a searchable archive that spans every project and every agent: your Kimi Code, Claude Code, Codex, Antigravity CLI and opencode conversations, together in one view.

  • Full-text search. Type what you remember (a module, a bug, a library) and it searches inside the content of every conversation, with matching messages shown so you can confirm the session before opening it. No ids involved.
  • Filter by project. Conversations are grouped by project with their own colors, so history stays readable even when the volume grows.
  • Cross-agent view. Search "auth refactor" and see the Kimi Code session where you explored it next to the Claude Code session where you shipped it.
  • Resume from any terminal. Open a found conversation into a terminal with its context, without navigating to the right directory or copying a session id.

The flow inside the app is one click: the History button in any terminal opens the searchable view, and resume mode when opening a project lists that project's past conversations so you pick exactly where to continue. It is the same flow for every agent, which is the point: one memory, not four.

If you run several Kimi Code agents at once, history matters double, because "what did that terminal do while I watched the other one" becomes a daily question. The multiple Kimi Code sessions guide covers that workflow.

Native resume vs searchable history: when each is enough

Both approaches reopen a past Kimi Code conversation with its context. The difference is how you find it:

  • Getting back into your last session: native kimi --continue is perfect. Nothing to improve.
  • An older session you titled well: native works if you can find the id; the title was the hard part and you already did it.
  • An older session by content: native has no search; CodeAgentSwarm finds it by keyword with message previews.
  • Work from another project: native means going there first; CodeAgentSwarm searches across projects from wherever you are.
  • Work from another agent: native history is siloed per tool; CodeAgentSwarm holds all of them in one view.

The honest summary: if Kimi Code is your only agent and you title sessions religiously, native tooling gets you far. The moment you mix agents or projects, a single searchable history stops being a luxury. And if you also want the same trick for other CLIs, the companion guides on Claude Code history and opencode history cover their native equivalents.

FAQ

Yes. Every session is saved locally as plain files under ~/.kimi-code/sessions/, organized per project, with a global index at ~/.kimi-code/session_index.jsonl. Closing the terminal loses nothing: resume the latest session for a project with kimi --continue or a specific one with kimi --session <id>.

Run kimi --continue (short form -c) in the project directory to reopen its most recent session, or kimi --session <id> for a specific one (-r and --resume exist as hidden aliases). Watch the mode flags: passing --yolo, --auto or --plan while resuming overrides the mode the session had saved.

Under ~/.kimi-code/sessions/<workDirKey>/<sessionId>/, where the workDirKey is derived from a hash of the project path. Each session holds a state.json with its title and timestamps and the full transcript at agents/main/wire.jsonl in JSONL format. The layout can evolve between releases, so treat it as inspectable rather than guaranteed.

Inside the session, run /title <text>. The title is persisted with the session on disk, so it is how you recognize the conversation later. Titling sessions while the context is fresh is the best native defense against hunting through anonymous session ids a week later.

Not natively: Kimi Code has no built-in full-text search across sessions. Since transcripts are plain JSONL you can grep them by hand. CodeAgentSwarm indexes that same history and gives you keyword search with message previews across every project, and across your other agents too.

Yes, in CodeAgentSwarm. Because the agent is chosen per terminal, conversation history is not siloed by tool: the same searchable view holds Kimi Code, Claude Code, Codex, Antigravity CLI and opencode sessions, and any of them can be reopened into a terminal from there.

Stop hunting for session ids. CodeAgentSwarm searches your full Kimi Code history by keyword, alongside your Claude Code, Codex and opencode conversations, and resumes the right one from any terminal.

Try CodeAgentSwarm

CodeAgentSwarm Free for macOS & Windows

Download free