[FEATURE] Allow session storage in project directory NO DUPLICATE
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
--resumewith 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
- I start Claude Code in ~/projects/my-app and work on a feature
- I later reorganize and move the project to ~/work/client/my-app
- My session history is now disconnected from the project
- With this feature, I could store sessions in .claude/sessions/ within the project
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗