github / github/copilot-cli

deleted sessions still in /chronicle insights

Open
#3,811 0 comments 0 reactions 0 assignees View on GitHub
area:sessions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### Describe the bug

I'm following the steps documented [here](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/chronicle#how-session-data-is-stored) to erase my Copilot CLI session history and get back to a pristine state.

After wiping `~/.copilot/session-*`, deleting all synced sessions from GitHub and reindexing, `/chronicle cost-tips` still pulls insights from the deleted sessions. And it is not the only subcommand that exhibits this behavior.

I've inspected the local Sqlite3 database (`~/.copilot/session-store.db`) and the `sessions` table still contained the deleted sessions (they are 11 days old as of today) after it was recreated.

I've tried to turn off the remote session sync features from both my organization's profile policies and from the Copilot CLI settings (`remoteExport` and `remoteSessions`) ― the deleted sessions are still in `/chronicle` insights!

I'm trying to get back to a pristine state because cost tips and other insights I'm getting relate to outdated habits and don't reflect the current ones.

### Affected version

GitHub Copilot CLI 1.0.62

### Steps to reproduce the behavior

The steps require a profile with remote session sync enabled and with some session data recorded within the past 1-2 weeks (I'm providing those numbers because they match my scenario).

1. Erase Copilot session data as documented [here](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/chronicle#how-session-data-is-stored) ― Run both local and remote cleanup
2. Run a `/chronicle` query against one of the deleted sessions, i.e. `/chronicle search Some cool session`

### Expected behavior

`/chronicle` should not include deleted sessions in the computed insights.

### Additional context

- Operating system: Ubuntu Server 24.04.4 LTS
- CPU architecture: x86_64
- Terminal emulator: tmux 3.4
- Shell: Bash 5.2.21

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the cleanup and query steps for `/chronicle`, then inspect `~/.copilot/session-store.db`, especially the `sessions` table, before and after reindexing. Trace how `/chronicle search` and `/chronicle cost-tips` read session data; done means deleted sessions no longer appear in computed insights after local and remote cleanup.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, sqlite
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.