Feature request: lightweight session archive for `claude --resume` (no background process involved)
Sessions under ~/.claude/projects/<workspace-slug>/*.jsonl just accumulate forever — there's no sessions subcommand and no flag to hide old/finished ones from the --resume picker (checked claude --help, confirmed nothing exists today).
The desktop app already has an "archive" action, but it solves a different, heavier problem: each desktop conversation tab keeps a persistent background process (and possibly a worktree) alive, so its archive has to stop that process and clean up the worktree before it can hide the session. That's implemented via an MCP tool (archive_session) injected by the desktop shell.
Bare CLI doesn't have that problem — there's no persistent background process per session to manage; the process just ends when you exit the terminal. So a CLI-native archive doesn't need any of that machinery. It only needs to solve list hygiene:
Minimal proposal:
claude --resumegains a way to mark a session archived — either (a) move<id>.jsonlinto~/.claude/projects/<workspace-slug>/archive/, or (b) leave the file in place and record archived ids in a small sidecar index (e.g..archived.json) in the same folder.- The default
--resumepicker skips archived sessions; a flag (e.g.--resume --include-archived) shows them.
This is purely local session-listing logic — no MCP server, no IPC bridge, no process management required. Wanted to flag the actual minimal scope explicitly, since it's much smaller than feature-parity with the desktop app's archive button.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗