Sessions/chat history hidden after update: existing sessions not re-keyed to new workspace-path scheme
Sessions/chat history disappears after update: old sessions not re-keyed to the new workspace-path scheme
Summary
After updating Kiro, the session/chat history for existing workspaces appears empty.
The session data is not deleted: the files are still on disk under
~/.kiro/sessions/<workspace-hash>/. The problem is that the updated version no
longer associates those existing sessions with the opened workspace, so the
history list shows nothing.
Severity / impact
High perceived impact: users reasonably believe all their previous work and reasoning history has been permanently lost after a routine update. The data is recoverable, but only by manually editing internal session files.
Environment
- OS: Microsoft Windows 11 Enterprise (build 26200)
- Kiro version: 1.0.0 (commit 0974fb9837d3a1c159ee4016bbbcd4fc21e14111)
- Update: occurred after upgrading to the latest version
Observed behavior
- All previous sessions for a workspace are missing from the history list.
- A brand-new session created after the update is shown correctly.
Root cause (from investigation)
Two distinct, compounding issues:
-
Workspace path normalization changed between versions.
- Older sessions store the workspace path in
session.jsonas lowercase with forward slashes, e.g.c:/users/<you>/projects/<project>. - The updated version stores it with real on-disk casing and backslashes, e.g.
c:\Users\<you>\projects\<Project>. - The history list appears to match sessions to the open workspace by exact string comparison of this path, so old-format entries no longer match and are hidden — even though they sit in the correct per-workspace folder.
- Older sessions store the workspace path in
-
Sessions are keyed by a hash of the path; moving the project folder breaks it.
- The per-workspace session folder name is the first 16 hex characters of the SHA-256 of the normalized (lowercased, forward-slash) path. This was verified: the same scheme reproduces the existing folder names exactly, and the updated version itself writes new sessions into the folder computed this way.
- If the project folder is moved/renamed (e.g. relocated into another parent directory), the new path hashes to a different folder name. Old sessions remain under the previous hash folder and are never located when the project is opened at its new location.
Steps to reproduce
- On an older version, create a workspace and have a few sessions.
- Update Kiro to the latest version.
- Open the same workspace and check the session history → previous sessions are missing.
- (Variant) Move/rename the project folder before opening → still missing, and now stored under the old-path hash folder.
Expected vs actual
- Expected: existing sessions remain visible in history after an update (and ideally after a project-folder move).
- Actual: existing sessions are hidden; only post-update sessions appear.
Workaround (manual, what recovered the data)
- Locate the workspace's session folder under
~/.kiro/sessions/<hash>/. - Update the
workspacePathsfield inside eachsession.jsonto the new canonical format (real OS casing + backslashes). Only this field needs changing;messages.jsonlis untouched. - For a moved project folder: recompute the hash for the new path
(
sha256(lowercased-forward-slash-path)→ first 16 hex chars), move/copy the session folders into that new hash folder, and fixworkspacePaths.
Suggested fixes
- During migration, re-key existing sessions: rewrite
workspacePathsto the new canonical form for all stored sessions. - Make history matching normalization-insensitive (case-insensitive on Windows, slash-normalized) instead of exact string comparison.
- Decouple session storage from the raw path hash, or detect moved/renamed project folders, so relocating a workspace does not orphan its sessions.
Notes
- No data loss occurred; this is an association/indexing regression in the migration.
- Paths in this report are genericized on purpose since the issue is public.
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #9472: Chat history missing from sidebar after update — older sessions not listed (session format/path migration not applied) (98% similar)
- #9478: Past prompts not showing up (95% similar)
- #7320: Kiro (Latest Version) on Windows: Frequent "Remote Extension Host Terminated Unexpectedly" Error with Open Remote SSH Connection to Debian 13.1 Server, Causing Session Reset & Chat History Loss (85% similar)
- #6522: When navigating, the history gets lost (85% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both describe identical issue of chat history missing from sidebar after update due to session format/path migration problems, with very similar technical details about workspace path handling
REOPEN, this is a new issue, not a duplicate! @AnilMaktala
Thank you for your feedback! 🙏
The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
Thanks for the thorough diagnosis, @DUn2. We've been looking into this and your root cause analysis appears to check out:
- The workspace hash computation (
SHA-256(normalized_path)[0:16]) appears stable across versions — sessions seem to land in the correct directory workspacePathsinsession.jsonappears to store the raw path from the IDE, not the normalized form used for hashing- The session list matching logic may be doing an exact string comparison between the stored
workspacePathsand the current workspace path — which would cause old sessions (lowercase + forward slashes) to not match the new format (real casing + backslashes)
Your suggested fixes align with what we're seeing. We're treating this as the canonical tracking issue for this cluster (#9472, #9476 appear to report the same underlying bug)
Could you confirm: after the update, are new sessions created in the same ~/.kiro/sessions/<hash>/ directory as the old ones, just with the updated path format in session.json?
**Can confirm on an independent setup, same version (1.0.0, commit 0974fb9), Windows. Two things to add:
Independent corroboration of root cause #1. A pre-update session here stored workspacePaths as lowercase/forward-slash (c:/.../
Extra trigger (no folder move required). Just having opened both a parent folder and a subfolder as workspace roots at different times reproduces it, each hashes to its own
Most visible symptom: open chat tabs aren't restored after the update (likely downstream of the same association failure). Worth covering in the fix, since that's what users notice first.**
IDE 1.0.89 (Jul 3) shipped a fix so sessions restore automatically on launch. Could you update and confirm whether your chat history/sessions now appear correctly? To update: download from kiro.dev. If it's still missing, a fresh Conversation ID and your exact version would help us dig in.
This issue has been automatically closed due to inactivity. It has been 7 days since we requested additional information.
If you still need help with this issue, please feel free to reopen it or create a new issue with the requested details.