Session identity should be path-independent, not tied to project directory
Problem
Claude Code currently ties session identity to the project directory path. This means that whenever the path changes — for any reason — you lose access to session history, \/resume\, \/rewind\, and all other session-based features.
Affected scenarios
This is not just a single edge case. The same root cause breaks the workflow in multiple situations:
- Renaming or moving a project folder — session history is gone even though nothing about the project actually changed
- Cloning the same repo on a different machine — new path, new session, lost context
- Continuing work on another computer — even with the same repo, same branch, same everything, sessions don't transfer
- Different users on the same machine — same project, different home directory, disconnected sessions
What should change
Session identity should be tied to something stable and portable rather than the filesystem path. Some concrete options:
- Git remote URL — a natural stable identifier already present in most projects
- Project UUID in
.claude/— Claude Code already uses this directory; a.claude/project-idfile would be low-friction and work for non-git projects too - Hybrid — prefer git remote URL when available, fall back to a generated UUID stored in
.claude/
This would unlock:
- Bidirectional session teleport (see #14666)
- Cross-machine continuity without being forced to SSH into the original machine
- Safe project reorganization without losing session history
- Potential for team session sharing in the future
Current workarounds
- SSH into the original machine and use tmux to reattach (works, but defeats the purpose of portability)
- Maintaining detailed
CLAUDE.mdfiles to preserve project context (helps with context, not with history)
Why this matters
Right now, session portability is blocked at the architectural level, not the feature level. Bidirectional teleport, cross-machine continuity, and folder-move resilience are all symptoms of the same underlying issue: sessions are identified by path rather than by project.
Fixing the root cause would make all of these naturally solvable — and would also complement context continuity solutions like those proposed in #11455, #6553, and #9171, which address what Claude remembers between sessions but not the portability of the session itself.
Related issues
- #14666 — Bidirectional session teleport (a subset of this problem)
- #11455 — Session handoff / continuity support (complementary: context loss, not portability)
- #6553 — Chat session transfer and improved session management
- #9171 — Manual session save/load commands for multi-day projects
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗