Fix CLI chat history isolation for same-named projects - #1473
Open
Aaron-Savron wants to merge 1 commit into
Open
Aaron-Savron wants to merge 1 commit into
Aaron-Savron wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
found this while walking through the CLI code a lil bit. chat storage was keyed by just the folder name, so
/client-a/appand/client-b/appshared the same saved chats. continuing in B actually restored A's transcript and saved run state. matching chat IDs could also overwrite each other, and deleting the chat in B removed it from A too.this keys storage by a SHA-256 of the resolved absolute project path, under a separate
projects/by-pathnamespace. saving, history, deletion and continuation already use the same project directory helper so they stay isolated together.old history stays on disk. there's no automatic basename fallback or migration because those files don't reliably identify their owning project, and guessing would keep the wrong-project resume bug around. added recovery instructions for copying individual chats after checking which project they belong to, linked from the README. this means old chats need that manual recovery step before they show up in the new history.
validation:
65bca0da9) had the same existing errors as its unchanged worktree after normalizing checkout paths; no new diagnostics. rebased onto latest main and reran all 70 tests successfullythis only changes the CLI persistence key, tests and recovery docs. it does not include either of my other fixes.