Problem
Sessions are keyed by the absolute path of the project directory. If a user renames or moves their project folder, all previous sessions become unresumable — claude --resume <session-id> cannot find them.
Reproduction
- Start a Claude Code session in
/path/to/my-project, give it a name
- Rename the directory:
mv my-project my-project-v2
cd my-project-v2 && claude --resume <session-id> → session not found
The session .jsonl files remain in ~/.claude/projects/-path-to-my-project/ but Claude Code now looks in ~/.claude/projects/-path-to-my-project-v2/ and finds nothing.
Expected behavior
Sessions should be recoverable after a project rename/move. Possible approaches:
- Allow
--resume <session-id> to search across all projects, not just the current directory
- Provide a way to migrate sessions to a new project path
- Key sessions by something more stable than the absolute path (e.g., git remote URL or a project UUID)
Current workaround
Create a symlink from the old path to the new one, then resume from the old path. Works but fragile.
Environment
Generated by Claude
Problem
Sessions are keyed by the absolute path of the project directory. If a user renames or moves their project folder, all previous sessions become unresumable —
claude --resume <session-id>cannot find them.Reproduction
/path/to/my-project, give it a namemv my-project my-project-v2cd my-project-v2 && claude --resume <session-id>→ session not foundThe session
.jsonlfiles remain in~/.claude/projects/-path-to-my-project/but Claude Code now looks in~/.claude/projects/-path-to-my-project-v2/and finds nothing.Expected behavior
Sessions should be recoverable after a project rename/move. Possible approaches:
--resume <session-id>to search across all projects, not just the current directoryCurrent workaround
Create a symlink from the old path to the new one, then resume from the old path. Works but fragile.
Environment
Generated by Claude