session-recovery

Query the session_store database to find and resume interrupted Copilot CLI sessions.

2|1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/PlagueHO/plagueho.learn --skill session-recovery-plagueho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-recovery
Source: https://github.com/PlagueHO/plagueho.learn/tree/main/.copilot/skills/session-recovery
Command: npx skills add https://github.com/PlagueHO/plagueho.learn --skill session-recovery-plagueho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Squad agents run in Copilot CLI sessions that can be interrupted due to crashes, network drops, or 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.

Core Features & Use Cases

  • Find Recent Sessions
  • Filter Out Automated Sessions
  • Search by Topic (FTS5)
  • Search by Working Directory
  • Get Full Session Context Before Resuming
  • Resume a Session

Quick Start

Query recent sessions and resume the one you were actively working on.

Frequently Asked Questions about session-recovery

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

FAQPage Schema
How do I find recently interrupted Copilot CLI sessions?

You can find interrupted Copilot CLI sessions by querying the session_store SQLite database with the sql tool, filtering for recently updated sessions within the last 48 hours and excluding automated sessions.

Can I search Copilot CLI session history by topic or working directory?

Yes, you can search Copilot CLI session history by topic using FTS5 full-text search or by working directory, querying the session_store database to surface the most relevant recent checkpoint.

Does session recovery require the sql tool to access the session_store?

Yes, session recovery requires the sql tool to connect to the read-only session_store SQLite database to query session history and identify the correct session ID for resumption.

How does session recovery handle automated sessions and older checkpoints?

Session recovery filters out automated sessions entirely and only focuses on sessions updated within the last 48 hours, ensuring you resume active work without retrieving stale background processes.

What is the best way to get full context before resuming a Copilot CLI session?

The best way to get full context is to query the session_store database to retrieve the session's working directory, topic, and most recent checkpoint details before executing the resume command.