Browse, search, and resume GitHub Copilot CLI sessions from your terminal. Read my blog post for the full story.
The Copilot CLI maintains a SQLite database at ~/.copilot/session-store.db with session metadata, conversation turns, and a full-text search index. This tool queries that database and pipes the results through fzf for interactive fuzzy search, then resumes the chosen session in your current terminal.
git clone https://github.com/jonmagic/copilot-sessions.git
cd copilot-sessions
# Add to your PATH (or symlink bin/copilot-sessions somewhere on PATH)
export PATH="$PWD/bin:$PATH"
# Browse recent sessions
copilot-sessions
# Search for a session
copilot-sessions "home assistant"
# List without fzf
copilot-sessions -lcopilot-sessions Browse recent sessions (fzf)
copilot-sessions <query> Fuzzy search, then browse matches
copilot-sessions -l [n] List recent sessions without fzf (default: 20)
copilot-sessions -h Show help
| Key | Action |
|---|---|
Enter |
Resume selected session in this terminal |
Ctrl-Y |
Copy session ID to clipboard |
Esc |
Cancel |
TIME REPO SESSION
11m ago brain Home Assistant Automation Ideas
1h ago brain Research Copilot CLI Theme
4h ago brain Review And Seed Spotify Playlist
13h ago brain Enable Ghostty SSH Terminal
The Copilot CLI stores session data in ~/.copilot/session-store.db, a SQLite database with:
| Table | Contents |
|---|---|
sessions |
ID, summary, repository, branch, timestamps |
turns |
User messages and assistant responses |
checkpoints |
Titled snapshots with overviews |
session_files |
Files touched during the session |
session_refs |
Linked commits, PRs, and issues |
search_index |
FTS5 full-text search across all content |
Search uses fzf's built-in fuzzy matching against session summaries, all user messages, and repository names. This gives you:
- Typo tolerance —
mincraftfinds your Minecraft session,sptoifyfinds Spotify - Substring matching —
craftfinds Minecraft,towerfinds "Build Drop Tower" - Multi-word fuzzy —
cli themefinds "Research Copilot CLI Theme"
The search content (user messages from all turns) is appended off-screen after the visible display columns. fzf matches against it but --no-hscroll keeps the view clean.
All formatting — relative timestamps, repository name truncation, display layout — is computed inside a single SQLite query. No bash loops or per-row shell-outs. Startup is ~20ms for hundreds of sessions.
- GitHub Copilot CLI (with at least one session)
- fzf (
brew install fzf) - SQLite3 (pre-installed on macOS and most Linux)
- Bash 4+
Alias it for quick access:
alias cs=copilot-sessionsISC License
Copyright (c) 2026 Jonathan Hoyt
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.