claude-code-sessions-manager
v1.2.2
Published
TUI session manager for Claude Code: browse sessions grouped by directory; move, resume, fork, rename, export, and delete them across directories
Maintainers
Readme
claude-code-sessions-manager
A terminal UI for managing Claude Code sessions across directories.

(what you see above is generated demo data — try it yourself with node scripts/make-demo.mjs && ccs --claude-dir demo/claude-data)
Claude Code ties every session to the directory it was launched from
(~/.claude/projects/<encoded-path>/). Rename or move a project folder — or just
want to continue work somewhere else — and /resume, --continue, and --add-dir
all fail with "This conversation is from a different directory". This tool fixes
that:
- Browse every session on the machine, grouped by working directory, with titles, last activity, entry counts, sizes, git branch, and a running indicator.
- Move any session to another CWD safely. After the move,
cd <new-dir> && claude --resume <id>just works, with full conversation memory.
Install / run
npm install -g claude-code-sessions-manager
ccs # or: claude-code-sessions-managerOr without installing:
npx claude-code-sessions-managerLayout
Three panes: Projects (directory names, All on top) → Sessions of the
selected project (numbered, running/sdk badges) → Preview (branch, date,
entries, id, directory, and the first conversation turns).
Keys
| Key | Action | |-----|--------| | tab / left/right | switch pane (projects ↔ sessions) | | up/down, j/k | navigate the focused pane | | enter (sessions pane) | action menu: resume, move, fork, rename, export, copy resume cmd, delete | | space | multi-select sessions (then m/d act on the selection) | | m | move — session or selection; on the projects pane: move the whole project | | d | delete (recoverable) — session or selection | | / | search sessions by title, id, or path | | r | rescan | | q | quit |
All features
- Resume from anywhere — pick any session on the machine and resume it in its
own directory; optional
--dangerously-skip-permissionsvariant. - Move sessions (or entire project groups, including the project memory dir) between directories.
- Fork a session into another directory under a new session id, keeping the original untouched.
- Rename sessions — writes the same
ai-titlerecord Claude Code uses, so the new name also shows in the native/resumepicker. - Export a session to a readable markdown transcript.
- Delete sessions recoverably — the transcript moves to the backup dir and the manifest contains a working restore command.
- Bulk operations via multi-select.
ccs --jsonfor scripting.
Safety model
Moving a session never destroys data:
- The transcript and
history.jsonlare backed up to~/.claude/backups/claude-cwd-sessions/<timestamp>-<id>/first. - A machine-readable
manifest.jsonrecords source, destination, SHA-256 hashes, and exact restore instructions. - The rewritten transcript is verified (line-count match) before the source is removed; any failure triggers an automatic rollback.
- Sessions owned by a live
claudeprocess are refused (the live registry in~/.claude/sessions/is checked against actual pids).
What a move changes: the transcript file location, its per-line cwd fields, and
matching project fields in ~/.claude/history.jsonl. Per-session state keyed by
session id (file-history/, session-env/) is unaffected.
Scripting
ccs --json # all sessions grouped by directory, as JSONCustom Claude data directory
By default sessions are read from ~/.claude. To manage a different Claude
data dir (a second profile, a mounted backup, another user's copied dir):
ccs --claude-dir /path/to/other/.claude
CLAUDE_CONFIG_DIR=/path/to/other/.claude ccs # env var also worksPrecedence: --claude-dir > $CLAUDE_CONFIG_DIR > ~/.claude. Every
operation (scan, move, backups, delete) stays inside that directory, and
resume launches claude with CLAUDE_CONFIG_DIR set to it.
License
Proprietary — free to install and use; copying, modification, and redistribution are not permitted. See LICENSE.
