Auto-save sessions at project level with context management

Resolved 💬 4 comments Opened Apr 5, 2026 by rameen-afzal23 Closed May 16, 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

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

  1. I start a Claude Code session to work on my project
  2. I have to leave suddenly or my laptop shuts down
  3. I forgot to note the session ID before closing
  4. Next day I cannot resume - session is lost forever
  5. I have to start from scratch and re-explain

everything to Claude again, wasting time and tokens

Additional Context

_No response_

View original on GitHub ↗

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