Description
When a project directory is moved or renamed, claude --resume can no longer find previous conversations, even though the git repo and codebase are identical.
Steps to Reproduce
- Start a Claude Code conversation in
/path/to/my-project
- Move the directory:
mv /path/to/my-project /path/to/new-location/my-project
cd /path/to/new-location/my-project
- Run
claude --resume — shows "No conversations found to resume"
- Run
claude --resume <session-id> — shows "No conversation found with session ID: ..."
Expected Behavior
Claude Code should either:
- Allow resuming by session ID regardless of directory (with a warning/confirmation)
- Provide a way to migrate sessions to a new directory path (e.g.
claude --migrate-session <id>)
- Detect that the same git repo exists at a new path and offer to resume sessions from the old path
Actual Behavior
Sessions are tightly coupled to the original absolute directory path. The session data is stored under ~/.claude/projects/<encoded-path>/ and the sessions-index.json and JSONL files all contain hardcoded absolute paths. Moving the project directory makes all previous sessions inaccessible from the new location.
Workaround
The only current workaround is to move the directory back to its original path.
Environment
- Claude Code version: 2.1.50
- OS: Linux (Ubuntu)
Description
When a project directory is moved or renamed,
claude --resumecan no longer find previous conversations, even though the git repo and codebase are identical.Steps to Reproduce
/path/to/my-projectmv /path/to/my-project /path/to/new-location/my-projectcd /path/to/new-location/my-projectclaude --resume— shows "No conversations found to resume"claude --resume <session-id>— shows "No conversation found with session ID: ..."Expected Behavior
Claude Code should either:
claude --migrate-session <id>)Actual Behavior
Sessions are tightly coupled to the original absolute directory path. The session data is stored under
~/.claude/projects/<encoded-path>/and thesessions-index.jsonand JSONL files all contain hardcoded absolute paths. Moving the project directory makes all previous sessions inaccessible from the new location.Workaround
The only current workaround is to move the directory back to its original path.
Environment