claude-resume-ars
v0.1.3
Published
Quickly reopen your recent Claude Code sessions, each in its own Windows Terminal tab, auto-resumed in the correct directory.
Readme
Picking up where you left off means remembering which folders you were in and which conversation each tab held. After closing tabs, switching machines, or a reboot, that context is gone.
claude-resume (command ars) brings it back in one command. It reads the sessions Claude Code already keeps on disk, and reopens each recent chat as a Windows Terminal tab, started in the right folder and auto-resumed.
- Nothing to save. Claude writes every conversation to disk on each message, so there is no capture step and nothing to miss.
- Right folder, right chat. Each tab opens in the session's own directory and runs
claude --resumefor that exact conversation. - Every chat, not just one. A single folder can hold several conversations.
arsreopens the recent chats in each recent folder, up to a per-folder limit you set, instead of collapsing each folder to one. - Recent only. By default it looks back 24 hours, so you do not resurrect stale chats.
- Pick when you want. A tree menu lets you expand a folder and choose exactly which chats to reopen.
Quick Start
$ ars # reopen every recent chat, in every recent folder
Reopening 5 session(s) in Windows Terminal...$ ars --pick # tree menu: expand a folder, pick individual chats
$ ars --per-dir 5 # reopen up to 5 chats per folder for this run
$ ars --since 12h # widen or narrow the window (12h, 2d, 90m, 1w)
$ ars --list # preview recents grouped by folder, open nothingInstall
Requires Node.js 18+, Windows Terminal (wt), and Claude Code (claude on PATH).
npm install -g claude-resume-arsThat puts both claude-resume and the short alias ars on your PATH.
If PowerShell blocks the command with an execution-policy error, allow local scripts once:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSignedUsage
ars # reopen every recent chat in every recent folder (last 24h)
ars --pick # tree menu of recent folders; expand to choose chats
ars --list # show recent chats grouped by folder, open nothing (last week)
ars --since 12h # window as 12h, 2d, 90m, 1w (a bare number means hours)
ars --all-time # no age cutoff
ars --limit 4 # cap how many folders to show/reopen
ars --per-dir 5 # cap chats reopened per folder (default from config)
ars --safe # resume without --dangerously-skip-permissions
ars --dry-run # print what would open, open nothing
ars --debug # keep each tab open with a pause if resume fails
ars --config # show the settings file path and current valuesEvery session resumes with --dangerously-skip-permissions so Claude starts without a permission prompt. Pass --safe if you want the normal prompt back.
Bare ars looks back 24 hours. --pick shows your recent folders regardless of age (newest first by last activity), so a folder you touched long ago but talked to recently still appears; expand any of them to choose individual chats. --list looks back a week. An explicit --since, --all-time, or --limit overrides these defaults.
In the --pick tree menu, each folder is a top-level bullet. Up/Down move, Space expands or collapses the highlighted folder (Left/Right also collapse/expand), and once expanded its chats show as indented bullets. Space on a chat toggles it, A toggles every chat, Enter opens the checked chats (or, if none are checked, the highlighted folder's chats or the highlighted chat), Esc cancels.
Settings
How many recent chats a folder surfaces and reopens comes from ~/.claude-resume.json:
{ "chatsPerDir": 3 }It defaults to 3 when the file is absent. --per-dir N overrides it for a single run, and ars --config prints the resolved value and file path.
How it works
Claude Code writes every conversation to ~/.claude/projects/<encoded-dir>/<session-id>.jsonl and appends to it on every message. Each file records its own working directory, and the filename is the session id.
claude-resume is a reader. It scans that store, groups the sessions by directory, and keeps the most recent chatsPerDir chats in each folder within your time window. For each chat it reads a short title (the session summary Claude records, or the first thing you asked) so sibling chats from one folder stay distinguishable, writes a small wrapper .cmd that runs claude --resume <id> in the folder, and opens them as Windows Terminal tabs.
Sessions whose directory no longer exists are skipped, so a deleted project or a recycled worktree never reopens a dead folder.
Wrapper files hold real paths as literal text and wt is handed forward-slash paths, which sidesteps the backslash mangling that breaks a naive wt ... cmd /k "C:\..." launch.
License
MIT
