Auto-save sessions at project level with context management
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
Currently, Claude Code assigns a session ID when
a user exits with Ctrl+C, but there is no automatic
saving of this ID. Users must manually note it down.
If forgotten, the entire session context is lost
permanently. There is no project-level session
tracking built into Claude Code.
Proposed Solution
Sessions should auto-save per project folder without
any manual step. A new command should be available:
claude history
This should show all projects with their last session:
📁 my-website → last session: 2 days ago
📁 ecommerce-app → last session: yesterday
Resume by project name:
Claude resume my-website
Users should also be able to remove old sessions:
Claude history remove my-website/session-3
Alternative Solutions
Currently Claude Code offers /resume <session-id>
command, but the session ID must be manually saved
by the user. If the user forgets to note the ID
or closes the terminal unexpectedly, the session
is lost with no way to recover it.
No built-in alternative exists within Claude Code.
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
- I start a Claude Code session to work on my project
- I have to leave suddenly or my laptop shuts down
- I forgot to note the session ID before closing
- Next day I cannot resume - session is lost forever
- I have to start from scratch and re-explain
everything to Claude again, wasting time and tokens
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗