# 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.

Source: https://groundedby.com/agents/github-copilot-cli (updated 2026-10-29)

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

```text
~/.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`:

```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

```bash
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](/guides/redact-secrets-from-agent-logs).

The groundedby [evaluator](/evaluate) 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

- [GitHub docs, Copilot CLI config directory reference](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference)
- [github/copilot-cli changelog](https://github.com/github/copilot-cli/blob/main/changelog.md)
