[FEATURE] Session management in Code CLI
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
I miss a feature where I can list all sessions from the past within a project or maybe globally.
Actually I always look into the filesystem on .claude/projects to find old sessions which can be deleted.
Currently the only way to browse sessions is --resume inside an active session, but there's no way to list or manage them from outside.
Proposed Solution
A solution maybe something like this:
# claude --list
ID | created | last used
bd9e24b3-cf7a-401d-8261-e1e3ed9d6d3c | 2026-02-12 12:00:00 | 2026-02-16 16:52:33
cae31aee-ba5d-47b7-854a-6dbf77474fb9 | 2026-02-14 12:00:00 | 2026-02-28 12:34:32
c000a175-bfa9-41ef-acd6-2a6ef74dc3b5 | 2026-02-16 12:00:00 | 2026-02-25 14:52:46
d42a1024-c8f2-4605-af52-f789d3c89a7d | 2026-02-22 12:00:00 | 2026-03-01 20:10:20
Or a command like:
# claude --list-all
...
And then a command for deleting unneeded sessions:
# claude --remove <UUID>
# claude --remove-all [--confirm]
This also solves the problem finding old sessions which you may want to reuse.
Alternative Solutions
The current alternative solution is to find the session within the Claude config directory ./claude, which
is not the desied solution due to mistakes by deleting too much and maybe a configuration file you didn't want to remove.
Also switching between windows (especially if you use Code within devcontainers) is not a problem but adds mental load as well.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
Example scenario:
- Working on a project multiple times with different sessions because you have different features you don't want to mix in the responses of Claude Code
- Someday the features are done :-)
- Start working on many projects over time with this workflow increases the sessions also consumes drive space
- Listing all sessions or sessions of a project and delete them carefully with the flag (and an optional confirmation) maybe a nice to have feature
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗