Skip to content

[Feature]: Add Kimi Code CLI sessions to AI Vault / Agent Session History #5376

Description

@owesazevedo

Problem or use case

Kimi is listed as a supported agent in Orca and can be launched in a terminal pane, but its sessions do not appear in the right-sidebar Agent Session History panel (the AI Vault).

The panel currently shows sessions for agents that Orca already has session parsers for (Claude, Codex, Gemini, Cursor, Pi, etc.). When a user runs Kimi Code CLI (kimi), those sessions are stored locally but are not surfaced in Orca. This is confusing because the same panel may show Pi sessions that were using Kimi-hosted models (kimi-for-coding, kimi-k2.6), while native Kimi Code sessions are missing.

Background

Moonshot replaced the old Python kimi-cli with a new TypeScript CLI called Kimi Code (kimi):

This request is scoped to the new Kimi Code CLI only.

Where Kimi Code stores sessions

On macOS, Kimi Code stores sessions under ~/.kimi-code/sessions/. Each workspace gets a directory like wd_<name>_<hash>, and each session is a subdirectory (e.g. session_<uuid>). Session metadata is in state.json:

{
  "createdAt": "2026-06-14T21:40:23.005Z",
  "updatedAt": "2026-06-14T21:53:36.850Z",
  "title": "...",
  "isCustomTitle": false,
  "agents": { ... },
  "custom": {},
  "lastPrompt": "..."
}

There is also a top-level index at ~/.kimi-code/session_index.jsonl containing one JSON object per session with sessionId, sessionDir, and workDir.

Proposed solution

Add a session parser for Kimi Code CLI in the AI Vault scanning logic, similar to the existing parsers for claude, codex, pi, etc. The parser should read ~/.kimi-code/session_index.jsonl and/or the per-session state.json files to populate the Agent Session History panel and allow resuming via kimi -S <sessionId> or kimi --session <sessionId>.

Related issues

This is a narrower, specifically scoped request: getting Kimi Code sessions to appear in AI Vault / Agent Session History. It may share implementation with the broader Kimi Code support work tracked in #4570.

Additional context

A similar request was opened for Zed to support Kimi Code session history: zed-industries/zed#55578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions