session-recovery

Detect and resume interrupted Copilot CLI sessions by querying the session_store SQLite database.

2|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill session-recovery-elbruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: session-recovery
Source: https://github.com/elbruno/ElBruno.MagenticUI/tree/main/.squad/templates/skills/session-recovery
Command: npx skills add https://github.com/elbruno/ElBruno.MagenticUI --skill session-recovery-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When Copilot CLI sessions are interrupted by terminal crashes, network drops, or machine restarts, in-progress work is left in an unknown state: uncommitted branches, issues stuck in-progress, and unfinished checkpoints. This Skill teaches agents how to query the session_store SQLite database to find those interrupted sessions and resume them safely. ## Core Features & Use Cases - Session Discovery: Query recent sessions by time window, working directory, or keyword using the FTS5 search_index table, while filtering out automated keep-alive and heartbeat sessions. - Context Inspection: Review conversation turns, checkpoint progress, touched files, and linked PRs/issues before deciding to resume a session. - Orphaned Work Detection: Cross-reference session_refs with gh issue list to find issues marked in-progress that have no active session. - Use Case: After a laptop crash during PR creation, query sessions by branch name, check the last checkpoint to see whether the code was committed and the PR created, then resume with copilot --resume SESSION_ID or finish the remaining steps manually. ## Quick Start Ask the agent to find any Copilot CLI sessions from the last 24 hours that were interrupted and show where each one stopped.

Frequently Asked Questions about session-recovery

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

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

Query the sessions table in the session_store SQLite database filtered by a time window such as the last 24 hours, and join the latest checkpoint to see where each session stopped. Exclude automated keep-alive and heartbeat sessions to avoid noise.

How to search Copilot CLI session history by keyword?▼

Use the search_index FTS5 table with a MATCH query joined to the sessions table. Since FTS5 is keyword-based rather than semantic, expand queries with synonyms such as 'auth OR login OR token OR JWT' for better recall.

How do I resume a Copilot CLI session after a crash?▼

Run copilot --resume with the full session UUID after inspecting its checkpoints, turns, and touched files. Always use complete UUIDs rather than partial IDs, and verify the session actually has pending work before resuming.

Can I detect issues left in-progress with no active session?▼

Yes. Join sessions with session_refs where ref_type is 'issue', then cross-reference the results against gh issue list --label status:in-progress. Issues marked in-progress without a matching recent session are orphaned work.

Why does FTS5 search return no results for my query?▼

FTS5 is keyword-based, not semantic, so exact phrasing matters. Expand queries with synonyms using OR, and wrap paths or special characters in double quotes to avoid MATCH syntax errors.