Copilot CLI
Where GitHub Copilot CLI stores your session history
Copilot CLI keeps sessions in ~/.copilot/session-state and syncs them to your GitHub account by default. Where they are, how to export them and how to stop the sync.
Updated October 29, 2026 // Markdown
- Made by
- GitHub
- History lives in
- All
~/.copilot/session-state/<session-id>/events.jsonl - Search index
~/.copilot/session-store.db
- All
- Format
- JSONL events plus YAML and Markdown files per session
- Kept for
- No automatic expiry documented
- Resume
copilot --resume, copilot --continue- Cloud copy
- Synced to your GitHub account by default (remoteExport)
GitHub Copilot CLI, the copilot command, stores each session in its own folder. It differs from most agents in one way that matters: by default it syncs sessions to your GitHub account.
Where the files are
~/.copilot/
├── session-state/
│ └── <session-id>/
│ ├── events.jsonl # the session, as a stream of events
│ ├── workspace.yaml
│ ├── plan.md
│ ├── checkpoints/
│ └── files/
├── session-store.db # SQLite index used for search
├── command-history-state/
└── settings.json
Versions before 0.0.342 used history-session-state/. COPILOT_HOME moves the whole folder. The events.jsonl schema is not documented.
Turn off the cloud sync
In ~/.copilot/settings.json:
{
"remoteExport": false
}
Or for a single run: copilot --sync-session=off. On Copilot Business and Enterprise, the organization policy "Store local sessions in the Cloud" controls this.
Resume and export
copilot --resume # pick a session
copilot --resume=<id|name>
copilot --continue # the latest
Inside a session, /resume switches sessions and /share (also /export) writes the session to a file, HTML or a gist. --share=PATH does it at the end of a non-interactive run.
Delete history
/session delete [ID] removes one session and /session delete-all removes them all. Turn off sync first if you do not want a copy kept on GitHub.
Privacy notes
- Synced sessions sit in your GitHub account, alongside your code.
- Local files include command output and file contents. Redact before sharing.
The groundedby evaluator does not read Copilot CLI sessions yet.
Questions
Does Copilot CLI upload my sessions?+
By default, yes - sessions sync to your GitHub account. Set remoteExport to false in ~/.copilot/settings.json to stop it, or run with --sync-session=off. On Business and Enterprise plans an organization policy, "Store local sessions in the Cloud", decides.
Where are Copilot CLI sessions on disk?+
In ~/.copilot/session-state, one folder per session holding events.jsonl, workspace.yaml, plan.md, checkpoints and files. COPILOT_HOME moves the folder.
Is this the same as gh copilot?+
No. The gh copilot extension was retired in October 2025. Copilot CLI is the copilot command.
Sources
Waitlist
Your sessions, your call.
We are building an opt-in marketplace where developers license redacted sessions they pick, one by one. Join to hear first.
Read next
- Claude CodeWhere Claude Code stores your session historyClaude Code keeps every session as a JSONL file in ~/.claude/projects and deletes them after 30 days by default. How to find, resume, export, keep and delete them.Read +
- Codex CLIWhere OpenAI Codex CLI stores your session historyCodex CLI saves each session as a rollout JSONL file in ~/.codex/sessions by date and compresses old ones to .jsonl.zst. How to find, resume, archive and delete them.Read +
- Market$500, then $200: what one posting tells us about the price of a coding sessionIn October 2026 Mercor paid developers $500 per recorded coding session, then cut it to $200 within a week. What the price says about the market for agent session data.Read +