Allow resuming conversations from different directories
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 12 comments · opened Feb 25, 2026 · closed Aug 17, 2026
Problem
Conversations are tied to the directory where they were started. If the original directory no longer exists (e.g., deleted git worktree, moved/renamed directory), there's no way to resume that conversation.
The current behavior shows:
This conversation is from a different directory.
To resume, run:
cd /original/path && claude --resume <session-id>
But if /original/path no longer exists, this is impossible without manually recreating the directory structure.
Use Cases
- Git worktrees: Developers often create temporary worktrees for PRs/features, then delete them after merging. Conversations from those worktrees become inaccessible.
- Directory reorganization: Moving or renaming project directories orphans all associated conversations.
- Disk cleanup: Removing old project directories loses conversation history even if you want to reference it later.
Proposed Solution
Add a --force flag (or similar) to allow resuming a conversation regardless of directory mismatch:
claude --resume <session-id> --force
Or allow specifying a session ID without directory validation:
claude --resume <session-id> --ignore-directory
Current Workarounds
- Manually recreate the original directory path (empty directory works)
- Symlink current location to the old path
Both are cumbersome and shouldn't be necessary.
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Need this ASAP.
It's so bad that I haveto remember the directory to be able to continue a conversation.
When it's done, please ping me somebody ❤️
Could I also suggest you generate UUIDs within each project's
.claude/directory so that if the developer manually moves or renames the directory, it is possible to automatically fix~/.claude/projects/to match?Related: #34985 — a concrete proposal for the VSCode extension side of this problem (cross-project session picker with implementation details for
SessionHistoryManager.fetchSessions()).I want this too
Claude Code ties conversations to the directory they were started in. There's no built-in flag to bypass this check.
Your options:
ln -s /Users/immanuelcomer/threatq/libra-ic /Users/immanuelcomer/threatq/chat-inc
cd /Users/immanuelcomer/threatq/chat-inc && claude --resume b82dfae7-524c-456a-988a-d346c6ef4dff
noticed a bug it says This conversation is from a different directory. on windows it thinks c:\projects and c:\PROJECTS are 2 different folders and not letting me resume. suddently it tought that my conversations were carried out in c:\projects but really were in c:\PROJECTS
Sharing a tool that sort of solves this: claude-session-picker. It's an fzf-based session picker (
crcommand) that automatically cds to the session's original working directory before resuming, so project-scoped memories load correctly. If the directory no longer exists, it offers to recreate it — the memories still load because they're stored by path in ~/.claude/projects/.Also includes starring, archiving, context usage display, and active session detection. Handy interface for managing/resuming sessions via CLI. Two files (zsh + Python), no dependencies beyond fzf.
An automatic way to fix this would be preferable, but you can manually fix this issue by finding the session you want to restore at
~/.claude/projects/-path-to-deleted-directory/sessionid.jsonland copy that file to~/.claude/projects/-path-to-target-directory/+1 — and it's not just dev workflows. I'm a desktop-app user running Claude Code on writing/business projects in Google-Drive-synced folders. Renaming one top-level project folder orphaned every chat inside it ("Session not found on disk"); the only recovery that worked was renaming the folder back. Community relink tools only fix the CLI layer (~/.claude/projects) — the desktop app keeps its own session→path binding in the app's IndexedDB, so nothing user-accessible repairs it. The chilling effect is real: I now treat folder names as frozen, and my folder structure keeps bloating because any reorganization costs me the history. Path-independent sessions (or a supported relocate/migrate command) would fix this whole class of problems.
Adding the Desktop relocation/UI part of #55831, which was closed and later locked by lifecycle automation with instructions to file again if the request remained relevant. I am adding it here instead of opening another duplicate because this is the active path-independent resume request.
For Desktop,
--forceor--ignore-directorywould solve only the CLI half. The useful user-facing workflow is a supported Relocate project or Reconnect session action that:The current workaround of copying JSONL files or recreating/symlinking an old path is not suitable for ordinary Desktop users and can leave the CLI and Desktop stores disagreeing. A single supported migration action would cover folder renames, moves, drive-letter changes, and deleted worktrees without freezing users' directory structure.
The transcript file can survive the directory that created it. The message about a different directory blocks the resume check, but it does not by itself mean the conversation history is gone. In my cases, the
.jsonlwas still under the old project slug in~/.claude/projects/.I built
BasedGPT/claude-code-session-recoveryfor this path-binding problem. Runpython tools/diagnose.pyfirst and follow the exact command it prints. It checks the metadata, project slugs, and worktree paths so you can separate a stale path from a missing transcript file. Before any write, confirm that the affected UUID is still present and keep the original.jsonluntouched.If the old directory was renamed or a worktree was deleted, the diagnosis gives you the safe route for reconnecting the existing session to its current project path. That avoids recreating a dead directory just to satisfy the resume check.
Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)