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

✍️ OpenClawRadar📅 Published: April 14, 2026🔗 Source
How to Move or Rename Claude Code Project Folders Without Losing Session History
Ad

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/clamp
Ad

Steps to Use clamp

Follow these steps in order:

  1. 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.
  2. Run the real migration:
    clamp /Users/alex/old-project-name /Users/alex/documents/new-project-name
    Type y to confirm.
  3. Verify everything landed correctly:
    clamp --list clamp --verify
  4. 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-name

This 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

Ad

👀 See Also

AI Claw: Serverless Bridge Connects Alexa to Local OpenClaw with Dual Delivery
Tools

AI Claw: Serverless Bridge Connects Alexa to Local OpenClaw with Dual Delivery

AI Claw is a Python AWS Lambda pipeline that connects Amazon Echo speakers to local OpenClaw instances, bypassing Amazon's 8-second timeout by using a fire-and-forget architecture with dual delivery to Telegram and native Echo audio output.

OpenClawRadar
PACT 0.4.0 adds compound intelligence for AI coding agents
Tools

PACT 0.4.0 adds compound intelligence for AI coding agents

PACT (Programmatic Agent Constraint Toolkit) version 0.4.0 introduces compound intelligence features that help AI coding agents retain knowledge across sessions. The update includes research synthesis, a knowledge directory, and capability self-awareness systems.

OpenClawRadar
Academic Research Skills for Claude Code: A Human-in-the-Loop Pipeline for Paper Writing
Tools

Academic Research Skills for Claude Code: A Human-in-the-Loop Pipeline for Paper Writing

Academic Research Skills (ARS) v3.7.0+ is a Claude Code plugin that automates reference hunting, citation formatting, data checking, and logical consistency review while keeping the human researcher in control. Install via /plugin marketplace add Imbad0202/academic-research-skills.

OpenClawRadar
LLMock: HTTP-based mocking server for deterministic LLM testing across processes
Tools

LLMock: HTTP-based mocking server for deterministic LLM testing across processes

LLMock is a real HTTP server that mocks OpenAI, Claude, and Gemini APIs, allowing developers to run deterministic tests across multiple processes without hitting real APIs. It supports SSE streaming, tool calls, predicate routing, and request journaling with zero dependencies.

OpenClawRadar