reopen-sessions
Skill2 starsChanged 14 days agoMITView on GitHub
Reopens, one terminal tab each, the Claude Code sessions that were running before the terminal, the IDE or the computer crashed or closed, or the ones about a topic the user names, in whatever terminal or app the user runs them in (Ghostty, iTerm, Terminal.app, WezTerm, kitty, Windows Terminal, GNOME Terminal; JustSessions, an IDE or any other app gets the steps or commands instead). Use when the user says "reopen my sessions", "my terminal crashed", "WebStorm crashed, bring my sessions back", "resume all the sessions I had open", "reopen the session about…", "rouvre mes sessions", or after moving to another terminal app.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- capability-builderSkill
- ci-reviewSkill
- daily-syncSkill
- handoffSkill
- insta360-montageSkill
- kbSkill
- pr-watchSkill
- remindersSkill
- sprint-demoSkill
- tech-watchSkill
- test-evidenceSkill
- video-montageSkill
The file
Files
Reopen sessions
$SK is this skill's base directory. claude-reopen.sh lists the interactive sessions that no longer run, newest first, with how long ago each was used, its folder and its title (the /rename title, else the one Claude Code gave it, else its first prompt), and opens the chosen ones in new tabs of the terminal it runs in, each in its folder with claude --resume <id>.
- Find them. After a crash:
bash "$SK/claude-reopen.sh" --list(the last 30 minutes; add a number of minutes when it was earlier). For a session the user names by topic:--list --find "<words>", any age, matched on titles and typed prompts. Memory can help too: a note in the user's memory or knowledge base (the kb skill) often records the session it came from (originSessionId: <id>,source: session:<id>); search it for the topic and use that id. - Agree on the list. Nothing marks which sessions were open at the crash: a time window can catch one the user had already left. Show the list and ask which ones, unless it plainly matches what the user described.
- Open them:
bash "$SK/claude-reopen.sh" <id> <id>…(8 characters are enough). - Check they run:
ps -ax -o command | grep -- '--resume'(Windows:tasklist). A shell can take a few seconds to start. If one did not start, give thecd … && claude --resume …line for it.
The terminal is the one Claude runs in (TERM_PROGRAM, KITTY_WINDOW_ID, WT_SESSION, GNOME_TERMINAL_SCREEN, else on macOS the app Claude's process runs under); --terminal <name> or CLAUDE_REOPEN_TERMINAL picks another. When the user has moved to another app since, ask where they want them and pass --terminal. JustSessions takes no command from outside: the script says it reopens its own tabs at launch and how to resume the others from its Projects list, then prints the commands; relay that. Any other app it cannot drive (an IDE terminal, Warp…) gets the commands, grouped by repo. On macOS the first run may ask to let the terminal control Ghostty, iTerm or Terminal (Terminal.app also needs System Events, to press Cmd-T). kitty needs allow_remote_control yes. With no terminal it can drive, it prints one command per session.
Each repo gets its own window, its sessions as tabs in it (the git repo of the session's folder, else the folder), so tabs are grouped as in an IDE; --one-window puts them all in one. Run by hand in a terminal, the script asks which ones to open (numbers, Enter for all); --all skips the question. Sessions started by a program (claude -p, the SDK) are left out; the current session and the others still running are skipped.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

