restart-session

Wraps or resumes Claude Code sessions by loading notes.md context and syncing git branches.

6|1|Updated Jun 6, 2026
One-click install
npx skills add https://github.com/t-mercier/ai-agents-orchestrator --skill restart-session-t-mercier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restart-session
Source: https://github.com/t-mercier/ai-agents-orchestrator/tree/main/skills/restart-session
Command: npx skills add https://github.com/t-mercier/ai-agents-orchestrator --skill restart-session-t-mercier

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long AI coding sessions lose context when compacted or closed, and resuming past work means manually hunting down notes, branches, and session IDs. This Skill restores a previous session's full working context into a fresh terminal, or safely wraps the current one before a restart. ## Core Features & Use Cases - Wrap-and-prompt mode: With no arguments, it runs the close-session flow, verifies notes.md was actually saved (persistence gate), then prints fresh-start instructions. - Resume mode: Given a session slug, it locates the session's notes.md, registers the current terminal in active-sessions.json, updates the frontmatter session_id, strips stale ARCHIVED markers, checks out the recorded git branch, and renames the session. - Collision guard: Detects when the current terminal is already bound to a different active session and asks before re-binding, preventing silent detachment of live work. - Use Case: After a weekend break, run "/restart-session auth-refactor" to reload the session's goal, open questions, and next steps, check out the right branch, and continue exactly where you left off. ## Quick Start Ask the AI to resume a previous session by running /restart-session followed by the session slug, for example "/restart-session auth-refactor".

Frequently Asked Questions about restart-session

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resume a previous Claude Code session with its notes?

Run /restart-session followed by the session slug. The skill locates the session's notes.md, loads its goal and next steps, registers your current terminal in active-sessions.json, and checks out the recorded git branch.

How do I safely wrap the current session before starting fresh?

Run /restart-session with no arguments. It executes the close-session flow, verifies notes.md was actually updated with today's session history, then prints fresh-start options such as /clear followed by /restart-session with your slug.

What happens if my terminal is already bound to another active session?

A collision guard detects the conflict and asks before proceeding. The recommended option reopens the target session in a fresh terminal, leaving both sessions intact; re-binding is only suggested when current work is truly done.

Does restart-session work with archived sessions?

Yes. It strips genuine ARCHIVED markers from the Session history section so the dashboard reclassifies the session under the normal lifecycle. The matching is strict, so bullets merely mentioning the word archived are preserved.

Why does restart-session fail in plan mode?

Plan mode blocks file writes, and this skill must update notes.md, active-sessions.json, and session files. It detects the plan-mode reminder, stops immediately, and asks you to switch to auto mode before re-running.

What happens if the recorded git branch no longer exists?

The skill warns that the branch was not found, possibly deleted after a merge, and stays on the current branch instead of failing. It never uses force flags and aborts rebases cleanly on conflicts.