Bug Report
Summary
session_index.jsonl can end up with two JSON objects concatenated on the same line (missing newline separator), which causes kimi --session <id> to fail with [session.not_found] even when the session directory exists and is intact.
Environment
- kimi-code version: v0.27.0
- Platform: Windows x64
- Node version: v24.15.0
Steps to Reproduce
- Create multiple sessions in the same working directory over several kimi-code launches.
- At some point, the index write loses the newline separator between two entries.
- Attempt to resume the earlier session by ID:
kimi --session <id>.
- Error:
Failed to resume session <id>: [session.not_found]
Root Cause
session_index.jsonl had two JSON objects on the same line without a newline separator.
When the CLI reads the index line-by-line, the first line fails to parse, so the session entry becomes unreadable.
Workaround
Manually split the concatenated entry onto its own line in ~/.kimi-code/session_index.jsonl.
Notes
- The session directory is fully intact: state.json, wire.jsonl (~878KB), agents/main/ all present and valid.
- This appears to be a bug in the index append/write logic where the newline separator is occasionally lost.
Bug Report
Summary
session_index.jsonlcan end up with two JSON objects concatenated on the same line (missing newline separator), which causeskimi --session <id>to fail with[session.not_found]even when the session directory exists and is intact.Environment
Steps to Reproduce
kimi --session <id>.Failed to resume session <id>: [session.not_found]Root Cause
session_index.jsonlhad two JSON objects on the same line without a newline separator.When the CLI reads the index line-by-line, the first line fails to parse, so the session entry becomes unreadable.
Workaround
Manually split the concatenated entry onto its own line in
~/.kimi-code/session_index.jsonl.Notes