Session resume should support moved/renamed project directories

Resolved 💬 2 comments Opened Feb 21, 2026 by pyxis777 Closed Feb 21, 2026

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

  1. Start a Claude Code conversation in /path/to/my-project
  2. Move the directory: mv /path/to/my-project /path/to/new-location/my-project
  3. cd /path/to/new-location/my-project
  4. Run claude --resume — shows "No conversations found to resume"
  5. 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)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗