How to Move or Rename Claude Code Project Folders Without Losing Session History

The Problem: mv Breaks Claude Code Session History
Claude Code stores your session history in ~/.claude/projects/ using the exact absolute path of your project as an identifier. For example, a project at /Users/alex/my-project gets a session folder at: ~/.claude/projects/-Users-alex-my-project/.
When you use mv to move or rename a project folder, the path no longer matches and all your sessions become invisible to Claude Code. The data isn't deleted but becomes orphaned.
The Solution: clamp Tool
clamp is a community-built tool that handles folder renaming, moving, or both while preserving Claude Code session history.
Install via Homebrew:
brew install wsagency/tap/clampSteps to Use clamp
Follow these steps in order:
- Dry run first (preview changes):
clamp --dry-run /Users/alex/old-project-name /Users/alex/documents/new-project-name
Check output for session files detected and new paths confirmed. - Run the real migration:
clamp /Users/alex/old-project-name /Users/alex/documents/new-project-name
Typeyto confirm. - Verify everything landed correctly:
clamp --list clamp --verify - Resume your session:
cd /Users/alex/documents/new-project-name
claude --continue
If You Already Used mv
If you already moved the folder with mv and broke session access, use the --fix command:
clamp --fix --from /Users/alex/old-project-name --to /Users/alex/documents/new-project-nameThis tool addresses a specific pain point for developers who reorganize their project structures while maintaining access to their Claude Code conversation history.
📖 Read the full source: r/ClaudeAI
👀 See Also
DuckDB’s Quack Protocol Enables Client-Server with Multiple Concurrent Writers
DuckDB introduces the Quack remote protocol, allowing two DuckDB instances to communicate as client and server, supporting concurrent writers and leveraging HTTP for transport.

QCAI Mobile App Adds OpenClaw Gateway Control with Native Tailscale VPN
QCAI for iOS and Android now integrates with OpenClaw Control Center, allowing direct gateway management from mobile devices via secure Tailscale VPN tunnels without open ports.

Claude 4.6 Opus Reasoning Distilled to 14GB for Apple Silicon via MLX Quantization
A developer has quantized a Qwen 3.5 27B model distilled from Claude 4.6 Opus reasoning trajectories from 55.6GB to 14GB using MLX for Apple Silicon, achieving ~16 tokens/sec on an M4 Pro while maintaining the model's analytical reasoning capabilities.

Benching local Qwen 3.6 27B as a Codex validator co-agent
A developer built a reproducible eval suite to test Qwen 3.6 27B GGUF profiles (llama.cpp) as a sidecar validator for Codex, finding 128k context profiles necessary for long-context tasks and minimal accuracy loss with q8 KV cache.