Have you been using GitHub Copilot CLI and wondered — “What was that prompt I used 2 days ago?”
Did you know your prompt history is stored locally on your machine, and you can look it up anytime!
Where is the history stored?
Look for a file called command-history-state.json inside the .copilot folder in your home directory.
| OS | Path |
|---|---|
| Windows | C:\Users\<username>\.copilot\command-history-state.json |
| macOS / Linux | ~/.copilot/command-history-state.json |

What’s inside?
Open the file and you’ll see a commandHistory array — a list of every prompt you’ve typed into Copilot CLI.

Hope this was helpful! 🙂



Leave a comment