Repository navigation
devshell: keep the AI's session transcripts in the host cache. - #152
Merged
vgvassilev merged 1 commit intoOct 29, 2026
Merged
Conversation
Claude writes each session's transcript under ~/.claude/projects/ in the container's HOME. HOME is in the container's own layer, so a re-created container loses every transcript, and `claude --resume` then says "No conversation found". bin/repro re-creates the container whenever its mounts change, so this happens often. Only memory survived, because it is bound from the host cache. Bind ai/transcripts/<repo>/<encoded-path>/ from the host cache like the memory directory: read-write, this project only. devshell-init points ~/.claude/projects/<cwd> at a directory in it, for each of the three cwds it already links memory for, and puts the memory link inside. A session started from any other directory, such as a subdirectory of /patches, is still not kept; memory has the same limit. Moving to this version re-creates each existing devshell, because its mounts change, and that drops the transcripts it holds. Copy any you want to keep out of ~/.claude/projects/ first. The posture check now checks that this project's transcripts are writable and that no other project's are visible. The linking moves into a function that `devshell-init --link-ai` runs alone, without root, so scripts/test_devshell_init.py can check the links.
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.
Claude writes each session's transcript under ~/.claude/projects/ in the container's HOME. HOME is in the container's own layer, so a re-created container loses every transcript, and
claude --resumethen says "No conversation found". bin/repro re-creates the container whenever its mounts change, so this happens often. Only memory survived, because it is bound from the host cache.Bind ai/transcripts/// from the host cache like the memory directory: read-write, this project only. devshell-init points ~/.claude/projects/ at a directory in it, for each of the three cwds it already links memory for, and puts the memory link inside. A session started from any other directory, such as a subdirectory of /patches, is still not kept; memory has the same limit.
Moving to this version re-creates each existing devshell, because its mounts change, and that drops the transcripts it holds. Copy any you want to keep out of ~/.claude/projects/ first.
The posture check now checks that this project's transcripts are writable and that no other project's are visible. The linking moves into a function that
devshell-init --link-airuns alone, without root, so scripts/test_devshell_init.py can check the links.