Expand description
Path math for migrate - relocating a session so it can be resumed from a
different project directory. Each tool ties a session to a directory
differently, so the encoding lives here (and is unit-tested against the
schemes observed on disk).
Functions§
- claude_
project_ folder - claude_
store_ root - Claude Code stores a session at
~/.claude/projects/<folder>/<uuid>.jsonl, where<folder>is the absolute project path with every/,., and_turned into-(the scheme observed across every project folder on disk). Resume is scoped to this folder, so migrating to a new directory means copying the transcript into that directory’s folder. Which Claude store a transcript should be written into. - gemini_
project_ hash - Gemini CLI stores chats under
~/.gemini/tmp/<projectHash>/chats/, where<projectHash>is the SHA-256 (hex) of the absolute project path. The chat JSON carries the same hash in itsprojectHashfield.