Official agent skill

Session Recovery

by microsoft in microsoft/waza

Find and resume interrupted Copilot CLI sessions using sessionstore queries

OfficialMITAuto-check passed

Install Session Recovery

skills CLI
$ npx skills add microsoft/waza --skill session-recovery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/waza session-recovery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/waza.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.copilot/skills/session-recovery .claude/skills/session-recovery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
session-recovery
GitHub stars
1.4k
Used in
4 other repos
Token cost
~1.3k tokens
SKILL.md length
371 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

Find and resume interrupted Copilot CLI sessions using sessionstore queries

  • Works in 7 steps: Find Recent Sessions → Filter Out Automated Sessions → Search by Topic (FTS5) → …
  • SKILL.md covers Context, Patterns, Examples and Anti-Patterns
  • Calls gh

What it does

Session Recovery is an agent skill from microsoft/waza, published by the product's own GitHub organization. Find and resume interrupted Copilot CLI sessions using sessionstore queries

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: CLI / Framework for Agent Skills - create, test, measure and improve skill quality and effectiveness. The licence is MIT.

Example prompts

  • “/session-recovery”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Find Recent Sessions
  2. Filter Out Automated Sessions
  3. Search by Topic (FTS5)
  4. Search by Working Directory
  5. Get Full Session Context Before Resuming
  6. Detect Orphaned Issue Work
  7. Resume a Session

What it can do on your machine

Read from SKILL.md and the folder at commit 774df00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Session Recovery loads about 1.3k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 371 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/waza at commit 774df00, republished under its MIT licence (© microsoft). 371 words, ~1,286 tokens.

Download SKILL.mdSave it as .claude/skills/session-recovery/SKILL.md (or your agent's skills folder).
name
session-recovery
description
Find and resume interrupted Copilot CLI sessions using session_store queries
domain
workflow-recovery
confidence
high
source
earned

Context

Squad agents run in Copilot CLI sessions that can be interrupted — terminal crashes, network drops, machine restarts, or accidental window closes. When this happens, in-progress work may be left in a partially-completed state: branches with uncommitted changes, issues marked in-progress with no active agent, or checkpoints that were never finalized.

Copilot CLI stores session history in a SQLite database called session_store (read-only, accessed via the sql tool with database: "session_store"). This skill teaches agents how to query that store to detect interrupted sessions and resume work.

Patterns

1. Find Recent Sessions

Query the sessions table filtered by time window. Include the last checkpoint to understand where the session stopped:

sql
SELECT
  s.id,
  s.summary,
  s.cwd,
  s.branch,
  s.updated_at,
  (SELECT title FROM checkpoints
   WHERE session_id = s.id
   ORDER BY checkpoint_number DESC LIMIT 1) AS last_checkpoint
FROM sessions s
WHERE s.updated_at >= datetime('now', '-24 hours')
ORDER BY s.updated_at DESC;
2. Filter Out Automated Sessions

Automated agents (monitors, keep-alive, heartbeat) create high-volume sessions that obscure human-initiated work. Exclude them:

sql
SELECT s.id, s.summary, s.cwd, s.updated_at,
  (SELECT title FROM checkpoints
   WHERE session_id = s.id
   ORDER BY checkpoint_number DESC LIMIT 1) AS last_checkpoint
FROM sessions s
WHERE s.updated_at >= datetime('now', '-24 hours')
  AND s.id NOT IN (
    SELECT DISTINCT t.session_id FROM turns t
    WHERE t.turn_index = 0
      AND (LOWER(t.user_message) LIKE '%keep-alive%'
           OR LOWER(t.user_message) LIKE '%heartbeat%')
  )
ORDER BY s.updated_at DESC;
3. Search by Topic (FTS5)

Use the search_index FTS5 table for keyword search. Expand queries with synonyms since this is keyword-based, not semantic:

sql
SELECT DISTINCT s.id, s.summary, s.cwd, s.updated_at
FROM search_index si
JOIN sessions s ON si.session_id = s.id
WHERE search_index MATCH 'auth OR login OR token OR JWT'
  AND s.updated_at >= datetime('now', '-48 hours')
ORDER BY s.updated_at DESC
LIMIT 10;
4. Search by Working Directory
sql
SELECT s.id, s.summary, s.updated_at,
  (SELECT title FROM checkpoints
   WHERE session_id = s.id
   ORDER BY checkpoint_number DESC LIMIT 1) AS last_checkpoint
FROM sessions s
WHERE s.cwd LIKE '%my-project%'
  AND s.updated_at >= datetime('now', '-48 hours')
ORDER BY s.updated_at DESC;
5. Get Full Session Context Before Resuming

Before resuming, inspect what the session was doing:

sql
-- Conversation turns
SELECT turn_index, substr(user_message, 1, 200) AS ask, timestamp
FROM turns WHERE session_id = 'SESSION_ID' ORDER BY turn_index;

-- Checkpoint progress
SELECT checkpoint_number, title, overview
FROM checkpoints WHERE session_id = 'SESSION_ID' ORDER BY checkpoint_number;

-- Files touched
SELECT file_path, tool_name
FROM session_files WHERE session_id = 'SESSION_ID';

-- Linked PRs/issues/commits
SELECT ref_type, ref_value
FROM session_refs WHERE session_id = 'SESSION_ID';
6. Detect Orphaned Issue Work

Find sessions that were working on issues but may not have completed:

sql
SELECT DISTINCT s.id, s.branch, s.summary, s.updated_at,
  sr.ref_type, sr.ref_value
FROM sessions s
JOIN session_refs sr ON s.id = sr.session_id
WHERE sr.ref_type = 'issue'
  AND s.updated_at >= datetime('now', '-48 hours')
ORDER BY s.updated_at DESC;

Cross-reference with gh issue list --label "status:in-progress" to find issues that are marked in-progress but have no active session.

7. Resume a Session

Once you have the session ID:

bash
# Resume directly
copilot --resume SESSION_ID
Show full SKILL.md (153 more words)Show less

Examples

Recovering from a crash during PR creation:

  1. Query recent sessions filtered by branch name
  2. Find the session that was working on the PR
  3. Check its last checkpoint — was the code committed? Was the PR created?
  4. Resume or manually complete the remaining steps

Finding yesterday's work on a feature:

  1. Use FTS5 search with feature keywords
  2. Filter to the relevant working directory
  3. Review checkpoint progress to see how far the session got
  4. Resume if work remains, or start fresh with the context

Anti-Patterns

  • ❌ Searching by partial session IDs — always use full UUIDs
  • ❌ Resuming sessions that completed successfully — they have no pending work
  • ❌ Using MATCH with special characters without escaping — wrap paths in double quotes
  • ❌ Skipping the automated-session filter — high-volume automated sessions will flood results
  • ❌ Assuming FTS5 is semantic search — it's keyword-based; always expand queries with synonyms
  • ❌ Ignoring checkpoint data — checkpoints show exactly where the session stopped

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .copilot/skills/session-recovery of microsoft/waza.

Open the folder on GitHubat commit 774df00

Used in 4 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in microsoft/waza, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Session Recovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Session Recovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Session Recovery this skillmicrosoft/waza1.4k4 repos~1.3kAutomated safety check: PassMIT
Resume SessionQ00/ouroboros6.2k—~1.2kAutomated safety check: PassMIT
Session Timeout Recoverythedaviddias/Front-End-Checklist74k—~543Automated safety check: PassMIT
Session Start Recoverykunchenguid/firstmate7.7k—~1.8kAutomated safety check: PassMIT
Session RecoveryLeoYeAI/openclaw-master-skills2.2k—~2.4kAutomated safety check: PassMIT
Resume Sessionjosstei/maestro-orchestrate465—~388Automated safety check: NotesApache-2.0

Similar skills

  • Resume Session

    Q00/ouroboros

    List in-flight Ouroboros sessions and show the commands needed to re-attach after MCP disconnect

    6.2k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Session Timeout Recovery

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing authenticated user flows or long forms.

    74k GitHub stars~543 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Session Start Recovery

    kunchenguid/firstmate

    Load when the session-start digest reports unfinished checks, actionable diagnostics, recovery inputs, or output requiring interpretation.

    7.7k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Session Recovery

    LeoYeAI/openclaw-master-skills

    AI会话管理与优化系统。解决会话上下文限制问题,通过三级文档系统、自动化脚本和上下文压缩实现快速恢复。包含:STATUS.md快速索引、memory详细记录、自动更新脚本、上下文压缩策略、信息识别机制。适用于长期AI项目、多任务并行、需要高效会话恢复的场景。触发词:会话恢复、session recovery、上下文压缩、快速恢复、会话管理。

    2.2k GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Resume Session

    josstei/maestro-orchestrate

    Resume an interrupted Maestro session using the existing active-session file and shared phase tracking

    465 GitHub stars~388 tokensUpdated yesterday
    MobileAuto-check: notes
  • Reactive Resume Builder

    reactive-resume/reactive-resume

    Builds resumes as valid JSON for the open-source Reactive Resume app by interviewing you, and can track job applications through its MCP tools.

    44k GitHub stars~1.5k tokensUpdated today
    Business, Finance & HRAuto-check passed

More from microsoft/waza

All 16 skills in this repo
  • Squad Commands Menu

    microsoft/waza

    Official

    Shows a categorized, interactive menu of common Squad operations, such as install, upgrade and team management, and collects arguments before running anything.

    1.4k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Official

    Shared collaboration rules for a team of squad agents covering worktree awareness, writing decisions to an inbox, cross-agent requests and reviewer lockout.

    1.4k GitHub starsUsed in 4 repos~500 tokens
    Auto-check passed
  • Official

    Walks through releasing a new version of the waza azd extension: changelog from commits, semver bump with your confirmation, and a release PR.

    1.4k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Official

    Dev-first branching model for the Squad project: feature work branches from dev, issue branches follow a naming rule and parallel issues use git worktrees.

    1.4k GitHub starsUsed in 4 repos~1.5k tokens
    Auto-check passed
  • Waza Skill Evaluator

    microsoft/waza

    Official

    Evaluates agent skills with a Go CLI that runs YAML-defined benchmarks, compares runs and scores the quality of SKILL.md frontmatter.

    1.4k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Reviewer Protocol

    microsoft/waza

    Official

    Reviewer rejection workflow and strict lockout semantics. An agent skill from microsoft/waza.

    1.4k GitHub starsUsed in 4 repos~1.1k tokens
    Auto-check passed

Questions about Session Recovery

What does Session Recovery do?

Find and resume interrupted Copilot CLI sessions using sessionstore queries. Session Recovery is an agent skill from microsoft/waza, published by the product's own GitHub organization.

How do I install Session Recovery in Claude Code?

Run `npx skills add microsoft/waza --skill session-recovery -a claude-code`. Or copy the skill folder (.copilot/skills/session-recovery in microsoft/waza) into .claude/skills/session-recovery in your project. Claude Code loads it when a task matches its description.

How do I install Session Recovery in Codex?

Run `npx skills add microsoft/waza --skill session-recovery -a codex`. Or copy the skill folder (.copilot/skills/session-recovery in microsoft/waza) into .agents/skills/session-recovery in your project. Codex loads it when a task matches its description.

Can I use Session Recovery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/waza --skill session-recovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/session-recovery, .gemini/skills/session-recovery, .github/skills/session-recovery and .opencode/skills/session-recovery in your project.

What does Session Recovery need to run?

Going by SKILL.md and its folder, Session Recovery needs the command-line tools its instructions call (gh).

Does Session Recovery access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Session Recovery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Session Recovery use?

Session Recovery is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Session Recovery use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Session Recovery?

Skills that share tags, products or a category with Session Recovery: Resume Session (Q00/ouroboros, 6.2k stars), Session Timeout Recovery (thedaviddias/Front-End-Checklist, 74k stars), Session Start Recovery (kunchenguid/firstmate, 7.7k stars) and Session Recovery (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Session Recovery?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/waza, which has 1,403 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/waza on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.