How to query your Copilot CLI session history | Advanced tips & tricks

GitHub · Intermediate ·🔧 Backend Engineering ·4mo ago

Key Takeaways

The video demonstrates advanced tips and tricks for the GitHub Copilot CLI, including querying the local SQLite database to retrieve session history and analyzing prompting habits to improve writing.

Full Transcript

Hi, I'm Evan Bole from the Copilot CLI team and this is advanced tips and tricks for the Copilot CLI. So often when I pick up a piece of work like I kind of want to load in context from like what I was doing yesterday. It's like I'm about to start fixing this bug. I know there was a bug in a similar area. I know I was using Copilot to solve that bug, but I don't remember exactly what we did. So I can just ask Copilot like a free form question. Hey, I'm pretty sure there was this bug in app.tsx yesterday that we solved. can you like go pull up the info related on that conversation that we had? So, Copilot CLI has a SQLite database that contains all of your session history locally. Uh there's a full text search index. Uh there's information in different tables on user messages, system responses, which files were edited, and the Copilot CLI has access to a to a tool that enables it to generate SQL, query this table, and then answer questions. Here we can see that yesterday I was indeed working on this bug and now that context is loaded into my context window. I can also use it for things like hey tell me about ways in which I could use copilot CLI better. Uh what are the common pitfalls that I run into when prompted?

Original Description

Evan Boyle from the GitHub Copilot CLI team shares advanced tips to level up your terminal workflow. Learn how to query your local SQLite database to pull up session history and recover context from past bug fixes. You can even ask Copilot to analyze your prompting habits to help you write better commands. #CopilotCLI #GitHubCopilot #GitHub Work with Copilot CLI: https://github.com/features/copilot/cli?utm_source=social-youtube-memory&utm_medium=social&utm_campaign=copilot-cli-ga-phase-two-2026 Stay up-to-date on all things GitHub by connecting with us: YouTube: https://gh.io/subgithub Blog: https://github.blog X: https://twitter.com/github LinkedIn: https://linkedin.com/company/github Insider newsletter: https://resources.github.com/newsletter/ Instagram: https://www.instagram.com/github TikTok: https://www.tiktok.com/@github About GitHub It’s where over 180 million developers create, share, and ship the best code possible. It’s a place for anyone, from anywhere, to build anything—it’s where the world builds software. https://github.com
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

The video teaches how to use the Copilot CLI to query the local SQLite database and retrieve session history, as well as analyze prompting habits to improve writing. This is useful for recovering context from past bug fixes and improving terminal workflow.

Key Takeaways
  1. Open the Copilot CLI
  2. Ask Copilot to retrieve session history
  3. Use SQL queries to retrieve specific data
  4. Analyze prompting habits to improve writing
  5. Use the retrieved context to fix bugs
💡 The Copilot CLI has a SQLite database that contains all session history locally, and can be queried using SQL to retrieve specific data and analyze prompting habits.

Related Reads

📰
Complete Guide: Transferring Firestore Data Between Databases (Including Subcollections)
Learn how to transfer Firestore data between databases, including subcollections, with a step-by-step guide
Dev.to · K-kibet
📰
How I Built a CLI That Generates 12 Project Templates in 30 Seconds
Learn to build a CLI tool that generates project templates in seconds, leveraging code examples and a step-by-step guide
Dev.to · ke jia
📰
Debouncing vs Throttling Explained: Why Modern Web Applications Can’t Live Without Them
Learn the difference between debouncing and throttling and why they're crucial for modern web applications
Medium · Programming
📰
The Complete Roadmap to Become a Backend Developer in 2025
Learn the steps to become a backend developer in 2025 and start your career in tech
Dev.to · qing
Up next
Build FREE App with AI: No Credit Card Needed! #shorts
Income stream surfers
Watch →