/wake-up-neo:wake-up-neofrom wake-up-neo
Restores Claude Code sessions lost after a crash or power loss by finding orphaned sessions, grouping them into work tracks, and reopening each track as a fullscreen iTerm2 window with one tab per session.
Ships in wake-up-neo. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Restore the Claude Code sessions that an unplanned shutdown killed, laid out as one iTerm2 window per work track.
Requirements: macOS, iTerm2 with the Python API enabled (Settings → General → Magic → Enable Python API), and uv on PATH. Script paths below are relative to this skill's directory.
python3 scripts/find_sessions.py
The script prints a JSON array. A session is listed when its transcript was last written before the current boot, the user typed into it, it does not end with the entries a normal exit appends, and no running process owns it now. Sessions that are already resumed drop out, so a second run after a partial restore lists only what is still missing. Teammates of a lead session are never listed; the lead decides whether to respawn them.
--days N widens or narrows how far before the boot to look (default 14).
Two things the script cannot know, and you must judge:
idle_hours_before_boot is the gap between the session's last write and the boot. A session with a small gap was certainly open. A large gap means either an idle tab left open for days or a session killed some earlier way (a closed tab, an earlier crash). Treat a large-gap session as open only when it visibly belongs to a track of certainly open sessions — a named worker of a coordinator session that is itself being restored. Otherwise leave it out and list it in the report.One window per track, one tab per session. Group by what the work is, not by repository: a coordinator session and the workers it drives belong together even when they live in different repositories, and two unrelated sessions in one repository do not. Use title, first_prompt, last_prompt, and root; when those are not enough, read the tail of the transcript. Put the coordinator or the most active session first in its window. Sessions that fit no track share one last window.
When the user described the layout they expect, follow it.
Write the plan as a JSON array of windows, each an array of the command strings exactly as the script printed them, and pass it to the opener:
uv run --script scripts/open_windows.py plan.json
Each window opens fullscreen. The command runs claude --resume <id> from the repository root, never from a worktree: a session started in a worktree is found from the root, and returns to its worktree by itself if it was working there.
The user asked for the sessions back, so open the windows without a confirmation round; a wrongly opened tab costs one keystroke to close.
Each resumed session registers itself in sessions/*.json under the Claude Code config directory within a few seconds. Compare the sessionId values there with the plan, and report:
command, and why.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lexfrei/ccc --plugin wake-up-neoOther plugins' skills for the same job