Skip to content

fix(parser): support new .kimi-code session layout and add .kimi_openclaw to OpenClaw defaults#665

Open
liaocaoxuezhe wants to merge 2 commits into
kenn-io:mainfrom
liaocaoxuezhe:fix/kimi-code-position
Open

fix(parser): support new .kimi-code session layout and add .kimi_openclaw to OpenClaw defaults#665
liaocaoxuezhe wants to merge 2 commits into
kenn-io:mainfrom
liaocaoxuezhe:fix/kimi-code-position

Conversation

@liaocaoxuezhe

Copy link
Copy Markdown

Kimi Code now stores sessions under .kimi-code/sessions/<workdir>_<hash>/session_<uuid>/agents/<agent>/wire.jsonl. Update DiscoverKimiSessions, FindKimiSourceFile, and ParseKimiSession to handle this layout while keeping compatibility with the legacy .kimi/sessions structure.

Also include .kimi_openclaw/agents in AgentOpenClaw default directories so sessions from the Kimi-packaged OpenClaw distribution are synced.

liaocaoxuezhe and others added 2 commits June 13, 2026 16:07
… to OpenClaw defaults

Kimi Code now stores sessions under .kimi-code/sessions/<workdir>_<hash>/
session_<uuid>/agents/main/wire.jsonl. Update DiscoverKimiSessions,
FindKimiSourceFile, and ParseKimiSession to handle this layout while
keeping compatibility with the legacy .kimi/sessions structure.

Also include .kimi_openclaw/agents in AgentOpenClaw default directories
so sessions from the Kimi-packaged OpenClaw distribution are synced.

Co-Authored-By: Claude <noreply@anthropic.com>
Kimi Code sessions may place wire.jsonl under agents/main or other
agent IDs such as agents/agent-0. Update discover, find, and parse to
handle any agent subdirectory and encode the agent ID into the session
ID as kimi:<workdir>:<agent>:<session> so multi-agent sessions do not
collide.

Co-Authored-By: Claude <noreply@anthropic.com>
@roborev-ci

roborev-ci Bot commented Jun 13, 2026

Copy link
Copy Markdown

roborev: Combined Review (154b35e)

Medium:

  • internal/sync/engine.go:698, internal/sync/engine.go:5978 - The new .kimi-code layout is only added to parser discovery; incremental sync paths still assume <project>/<session>/wire.jsonl. A changed .kimi-code/.../session.../agents/<agent>/wire.jsonl file is ignored by SyncPaths/watcher sync, and SyncSingleSession derives the project as agents for this layout. Extend the Kimi path classifier and single-session project derivation to handle the five-component .kimi-code relative path, using the workdir directory as the project, and add sync-engine tests for SyncPaths and SyncSingleSession.

Panel: ci_default_security | Synthesis: codex, 7s | Members: codex_default (codex/default, done, 4m7s), codex_security (codex/security, done, 43s) | Total: 4m57s

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant