Environment
- Kimi Code Desktop 1.0.4 (win32, x64, packaged)
- Windows
Summary
The session sidebar shows the same sessions twice, under two different workspace group headings. The sessions exist only once on disk, so this looks like a grouping / attribution problem rather than duplicated data.
Actual
The sidebar renders two groups:
KIMI Code
E:\Users\<user>\Desktop\其余事项
Both groups list the same three sessions, with identical titles and timestamps.
Evidence
1. Two workspace IDs point at the same folder
~/.kimi-code/workspaces.json:
"wd_workspace_f4fcbc1b8059": {
"root": "E:\\Users\\<user>\\Desktop\\KIMI Code",
"name": "KIMI Code",
"created_at": "2026-10-06T13:08:53.756Z",
"last_opened_at": "2026-10-06T15:59:23.831Z"
},
"wd_kimi-code_5dd6703f82c2": {
"root": "E:\\Users\\<user>\\Desktop\\KIMI Code",
"name": "KIMI Code",
"created_at": "2026-10-06T16:43:07.484Z",
"last_opened_at": "2026-10-06T16:43:07.484Z"
}
Note the two ID schemes: wd_workspace_<hash> (older) versus wd_<dirname-slug>_<hash> (newer). The legacy entry is neither migrated nor merged.
2. A workspace's root disagrees with the workDir of sessions stored under it
~/.kimi-code/session_index.jsonl:
session_f3a7a11d-... sessionDir=.../sessions/wd_workspace_f4fcbc1b8059/... workDir="E:\Users\<user>\Desktop\KIMI Code"
session_1537bb46-... sessionDir=.../sessions/wd_workspace_f4fcbc1b8059/... workDir="E:\Users\<user>\Desktop\其余事项"
session_40bf182f-... sessionDir=.../sessions/wd_workspace_f4fcbc1b8059/... workDir="E:\Users\<user>\Desktop\其余事项"
wd_workspace_f4fcbc1b8059 has root = "...\Desktop\KIMI Code", yet two of the sessions recorded under it belong to ...\Desktop\其余事项.
3. The root field appears to have been overwritten
An earlier backup of the same file, workspaces.json.bak, still contains:
"wd_workspace_f4fcbc1b8059": {
"root": "E:\\Users\\<user>\\Desktop\\其余事项",
"name": "KIMI Code"
}
So at that point root was 其余事项 while name was already KIMI Code — the display name never matched, and root later changed, leaving the sessions stranded.
Suspected cause
- The same folder ends up with two workspace records because the workspace-ID scheme changed; the legacy record is not merged.
- Switching folders overwrites an existing workspace record's
root instead of creating a new record, so it stops matching the workDir of sessions already stored under it.
- The sidebar derives one group heading from the workspace
name and another from the sessions' workDir, but takes the session set for the whole session directory without splitting it by workDir — so the same list is rendered under both headings.
Expected
Each session appears exactly once, under the workspace it actually belongs to.
Notes
- Restarting the app does not help; the inconsistent state is persisted in
workspaces.json / session_index.jsonl.
- I have not modified these files.
~/.kimi-code/sessions/.index-cache/scan.json is {"version":1,"sessions":{}} with an mtime a day old, in case the cache is involved.
Environment
Summary
The session sidebar shows the same sessions twice, under two different workspace group headings. The sessions exist only once on disk, so this looks like a grouping / attribution problem rather than duplicated data.
Actual
The sidebar renders two groups:
KIMI CodeE:\Users\<user>\Desktop\其余事项Both groups list the same three sessions, with identical titles and timestamps.
Evidence
1. Two workspace IDs point at the same folder
~/.kimi-code/workspaces.json:Note the two ID schemes:
wd_workspace_<hash>(older) versuswd_<dirname-slug>_<hash>(newer). The legacy entry is neither migrated nor merged.2. A workspace's
rootdisagrees with theworkDirof sessions stored under it~/.kimi-code/session_index.jsonl:wd_workspace_f4fcbc1b8059hasroot = "...\Desktop\KIMI Code", yet two of the sessions recorded under it belong to...\Desktop\其余事项.3. The
rootfield appears to have been overwrittenAn earlier backup of the same file,
workspaces.json.bak, still contains:So at that point
rootwas其余事项whilenamewas alreadyKIMI Code— the display name never matched, androotlater changed, leaving the sessions stranded.Suspected cause
rootinstead of creating a new record, so it stops matching theworkDirof sessions already stored under it.nameand another from the sessions'workDir, but takes the session set for the whole session directory without splitting it byworkDir— so the same list is rendered under both headings.Expected
Each session appears exactly once, under the workspace it actually belongs to.
Notes
workspaces.json/session_index.jsonl.~/.kimi-code/sessions/.index-cache/scan.jsonis{"version":1,"sessions":{}}with an mtime a day old, in case the cache is involved.