[FEATURE] Allow session storage in project directory NO DUPLICATE

Resolved 💬 3 comments Opened Feb 1, 2026 by rudolfschmidt Closed Feb 5, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Allow storing Claude Code sessions in the current project directory instead of (or in addition to) the centralized ~/.claude/ location.

## Problem

Currently, sessions are always stored in ~/.claude/. This causes issues when:

  • Moving or renaming project directories
  • Working on the same project across multiple machines
  • Wanting to keep session history with the project (e.g., in version control or backups)
  • Sharing session context with team members

Proposed Solution

Add a configuration option to store sessions in the project directory, e.g.:

``json
// .claude/settings.json
{
"sessionStorage": "local" // or "global" (default)
}
``

This would store sessions in .claude/sessions/ within the project.

Alternative Solutions

  • Using --resume with named sessions (requires remembering session names)
  • Git worktrees (adds complexity)

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

  1. I start Claude Code in ~/projects/my-app and work on a feature
  2. I later reorganize and move the project to ~/work/client/my-app
  3. My session history is now disconnected from the project
  4. With this feature, I could store sessions in .claude/sessions/ within the project
  5. This would keep session history intact when moving directories, and allow backing up sessions with the project

Additional Context

Similar to how other tools store project-specific state:

  • Git stores history in .git/
  • Node.js uses node_modules/
  • Python venvs use .venv/

A config option like this would solve it:

// .claude/settings.json
{
"sessionStorage": "local"
}

Additional Context

if you close it again because some assumed duplication I give up.

View original on GitHub ↗

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